Repository navigation
Tags
Tags
feat(session): 会话层 API——协调关闭、断开原因、接收策略、消息上下文、Body 序列化选项、发送队列溢出、连接统计 r… …elease version 新增(全部向后兼容,默认行为不变): - WebSocketManager.CloseAsync(connectionId | socket, code, reason, ct):先停收发再写关闭帧,等对端或 CloseHandshakeTimeout(默认 5 s) - HttpContext.GetWebSocketDisconnectInfo():断开原因(PeerClosed / ServerClosed / SendQueueOverflow / TransportError / Timeout / ServerStopping 等) - 接收策略:CloseOnOversizedRequest(1009)、RejectBinaryMessages(1003)、EnableStreamingUpload、DispatchMalformedRequests - WebSocketMessageContext.Current / ConnectionId - ResponseBodyJsonSerializerOptions / RequestBodyJsonSerializerOptions(不设时输出与旧版逐字节一致) - SendQueueOverflow 事件(每连接最多一次) - TryGetConnectionStats / GetConnectionStats(含待发队列长度) 行为变化(仅日志):畸形 JSON 帧仍默认丢弃,但日志从 Information + 堆栈降为 Debug,并计数。
PreviousNext