WebSocketServerRemoveAndCloseSession 方法 |
让Websocket客户端正常下线,调用本方法即可自由控制会话客户端强制下线操作。
Let the Websocket client go offline normally. Call this method to freely control the session client to force offline operation.
命名空间:
HslCommunication.WebSocket
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public void RemoveAndCloseSession(
WebSocketSession session,
string reason = null
)
Public Sub RemoveAndCloseSession (
session As WebSocketSession,
Optional reason As String = Nothing
)
public:
void RemoveAndCloseSession(
WebSocketSession^ session,
String^ reason = nullptr
)
member RemoveAndCloseSession :
session : WebSocketSession *
?reason : string
(* Defaults:
let _reason = defaultArg reason null
*)
-> unit
参数
- session
- 类型:HslCommunication.WebSocketWebSocketSession
当前的会话信息 - reason (Optional)
- 类型:SystemString
下线的原因,默认为空
参见