我正在测试发送需要将数据包发送到套接字服务器的程序。
请注意,我只是从此开始。
我已经在Visual Studio中安装了WebSocket4Net
您可以看到,我的websocket中有多个参数。发送
Imports WebSocket4Net
Public Class MainForm
Private websocket As WebSocket4Net.WebSocket
Function ConnectTest()
Try
websocket = New WebSocket4Net.WebSocket("wss://address")
websocket.Send(320("sendEvent", "m09Og1GNedYhd4hWVfdqONI6gEXBi72f", "test"))
Return True
Catch ex As Exception
MsgBox(ex.Message)
Return False
End Try
End Function
End Class
此代码将无法正常工作,因为我不确定应该如何正确构造它?到目前为止,我无法在线找到任何解决方案,而且我非常需要这项工作。
编辑:
websocket.Send("420{""sendStoreEvent"", ""m09Og1GNedYhd4hWVfdqONI6gEXBi72f"", ""V2""}")
这项工作有效吗?明天我将不得不在另一个位置测试该程序,因为该服务器仅在内部可用。感谢您的帮助!