Closed jiawade closed 1 year ago
From the URI you gave it seems you're using socket.io, which is a different protocol from websockets. Socket.io sometimes uses websockets for transport, but it has a lot of additional features on top of it which this library doesn't know about.
I recommend you find a library that supports Socket.io unless you want to reimplement a lot of code on top of websockets.
I See, thanks @PhilipRoman
my websockt uri is: ws://192.168.0.1:19900/socket/?EIO=3&transport=websocket&sid=30101e05-abcc-41c5-b361-376a814fd580 If I want to send messages to the server, must hava a valid sid, so how to create connection and get the sid My guess is to send an authentication token to the server when creating a connection, such as a Bearer type token