| WebSocketServer 方法 | 
WebSocketServer 类型公开以下成员。
 方法
方法| 名称 | 说明 | |
|---|---|---|
|  | AddSessionTopic | 
            给一个当前的会话信息动态添加订阅的主题 Dynamically add subscribed topics to a current session message | 
|  | Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | 
|  | Dispose(Boolean) | 
            释放当前的对象
             | 
|  | Equals | Determines whether the specified object is equal to the current object.(继承自 Object。) | 
|  | ExtraOnClose | 
            关闭的时候额外执行的功能代码
            (重写 CommunicationTcpServerExtraOnClose.) | 
|  | ExtraOnStart | 
            服务器启动的时候额外执行的功能代码
            (重写 CommunicationTcpServerExtraOnStart.) | 
|  | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(继承自 Object。) | 
|  | GetHashCode | Serves as the default hash function.(继承自 Object。) | 
|  | GetTrustedClients | 
            获取受信任的客户端列表(继承自 CommunicationTcpServer。) Get a list of trusted clients | 
|  | GetType | Gets the Type of the current instance.(继承自 Object。) | 
|  | LogDebugMsg | 
            记录当前的日志信息
            (继承自 CommunicationTcpServer。) | 
|  | MemberwiseClone | Creates a shallow copy of the current Object.(继承自 Object。) | 
|  | PublishAllClientPayload(Byte) | 
            向所有的客户端强制发送消息,消息类型为二进制消息,也就是 opCode = 2 Force the sending of messages to all clients, with the message type being binary messages, that is, opCode = 2 | 
|  | PublishAllClientPayload(String) | 
            向所有的客户端强制发送消息,消息类型为文本消息,也就是 opCode = 1 Force the sending of messages to all clients, with the message type being text messages, that is, opCode = 1 | 
|  | PublishAllClientPayloadAsync | 
            向所有的客户端强制发送消息,消息类型为文本消息,也就是 opCode = 1 Force the sending of messages to all clients, with the message type being text messages, that is, opCode = 1 | 
|  | PublishClientBinary | 
            向所有的客户端强制发送二进制数据,这个二进制数据是一个完整的websocket数据包,可以调用方法 WebScoketPackData(Int32, Boolean, Byte)来构建一个数据包 Force the sending of binary data to all clients. This binary data is a complete websocket data packet Can call methods WebScoketPackData(Int32, Boolean, Byte) to build a data packet | 
|  | PublishClientPayload(String, Byte) | 
            向订阅了topic主题的客户端发送二进制的消息,注意:二进制数据无法设置为消息驻留 Send binary messages to the clients that have subscribed to the topic. Note: Binary data cannot be set for message residence | 
|  | PublishClientPayload(String, String) | 
            向订阅了topic主题的客户端发送消息 Send messages to clients subscribed to topic | 
|  | PublishClientPayload(String, String, Boolean) | 
            向订阅了topic主题的客户端发送消息 Send messages to clients subscribed to topic | 
|  | PublishClientPayloadAsync(String, String) | 
            向订阅了topic主题的客户端发送消息 Send messages to clients subscribed to topic | 
|  | PublishClientPayloadAsync(String, String, Boolean) | 
            向订阅了topic主题的客户端发送消息 Send messages to clients subscribed to topic | 
|  | RemoveAndCloseSession | 
            让Websocket客户端正常下线,调用本方法即可自由控制会话客户端强制下线操作。 Let the Websocket client go offline normally. Call this method to freely control the session client to force offline operation. | 
|  | SendClientPayload(WebSocketSession, Byte) | 
            向指定的客户端发送数据 Send data to the specified client | 
|  | SendClientPayload(WebSocketSession, String) | 
            向指定的客户端发送数据 Send data to the specified client | 
|  | ServerClose | 
            关闭服务器的引擎(继承自 CommunicationTcpServer。) Shut down the server's engine | 
|  | ServerStart | 
            指定端口号来启动服务器的引擎(继承自 CommunicationTcpServer。) Specify the port number to start the server's engine | 
|  | ServerStart(Int32) | 
            指定端口号来启动服务器的引擎(继承自 CommunicationTcpServer。) Specify the port number to start the server's engine | 
|  | SetSslPipeAction | 
            设置一个SSL的管道操作对象,在管道实例化之后,可以进行一些初始化的属性设置,例如自定义 SslProtocols 枚举(继承自 CommunicationTcpServer。) | 
|  | SetTrustedIpAddress | 
            设置并启动受信任的客户端登录并读写,如果为null,将关闭对客户端的ip验证(继承自 CommunicationTcpServer。) Set and start the trusted client login and read and write, if it is null, the client's IP verification will be turned off | 
|  | SocketAcceptExtraCheck | 
            当客户端的socket登录的时候额外检查的操作,并返回操作的结果信息。(继承自 CommunicationTcpServer。) The operation is additionally checked when the client's socket logs in, and the result information of the operation is returned. | 
|  | ThreadPoolLogin | 
            当客户端连接到服务器,并听过额外的检查后,进行回调的方法(重写 CommunicationTcpServerThreadPoolLogin(PipeTcpNet, IPEndPoint).) Callback method when the client connects to the server and has heard additional checks | 
|  | ToString | Returns a string that represents the current object.(重写 ObjectToString.) | 
|  | UseSSL(X509Certificate) | 
            使用SSL通信,传递一个证书的对象
            (继承自 CommunicationTcpServer。) | 
|  | UseSSL(String, String) | 
            使用SSL通信,传递一个证书的路径,以及证书的密码
            (继承自 CommunicationTcpServer。) | 
 扩展方法
扩展方法| 名称 | 说明 | |
|---|---|---|
|  | ToJsonString | 
            获取当前对象的JSON格式表示的字符串。(由 HslExtension 定义。) Gets the string represented by the JSON format of the current object. | 
 参见
参见