WebSocket4Net错误-HTTP /1.1 200,然后关闭了连接

时间:2018-08-25 12:43:15

标签: vb.net websocket websocket4net

WebSocket4Net出现问题,打开连接时出现错误,然后关闭了连接。

问题如下:

我使用以下代码进行连接:

OK_Cancel confirmation alert

回调函数是:

Dim objWebSocket As WebSocket
objWebSocket = New WebSocket(WebsocketURL)
objWebSocket.Security.AllowNameMismatchCertificate = True
objWebSocket.Security.AllowCertificateChainErrors = True
AddHandler objWebSocket.Opened, AddressOf WebSocket_Opened
AddHandler objWebSocket.Error, AddressOf WebSocket_Error
AddHandler objWebSocket.Closed, AddressOf WebSocket_Closed
AddHandler objWebSocket.MessageReceived, AddressOf WebSocket_MessageReceived
objWebSocket.Open()

当我调用objWebSocket.Open()时,将触发WebSocket_Error函数,但出现异常:HTTP /1.1 200,然后关闭了连接。

请咨询

0 个答案:

没有答案