Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
Before messages can be exchanged, a websocket stream first needs to be connected, and then to have the webs在交换消息之前,WebSockethandshake performed. The stream delegates the task of establishing the connection to the next layers. For example, if the next layer is a connectible stream or socket object, it can be accessed to call the necessary function for connecting. Here we make an outbound connection as a client would do.流需要先建立连接,然后执行 WebSocket 握手。流将建立连接的任务委托给下一层。例如,如果下一层是可连接的流或套接字对象,可以通过访问它来调用必要的连接函数。以下示例展示客户端建立出站连接的过程。