Hi,
Host is a property where you must set domain name or ip, not URL, so in this case, you must set:
Host := 'localhost';
Port := 3001;
If you want pass parameters, you can use Options.Parameters := '/your_params';
Another option is not use host, port.. and pass full url, so component will decode url and set host, port, params... automatically, Example:
TsgcWebSocketClient.URL := 'ws://localhost:3001';
Setting URL to this value will have the same effect that setting Host and port.
TsgcWebSocketClient_SocketIO component is deprecated, use instead TsgcWebSocketClient with TsgcWSAPI_SocketIO attached to TsgcWebSocketClient, there is a demo inside demo folder called
client which allows to connect to several servers, one of them is Socket.IO
SendEvent, SendConnect... are methods deprecated which only applies to socket.io server api 0.*, now socket.io has newer undocumented api which is not compatible with these methods. So you must use
WriteData method to send JSON messages.
Example: this method calls to method 'add user' and pass as parameter 'UserName'
TsgcWSAPI_SocketIO.WriteData('42["add user", "UserName"]');
Hope this helps.
Sergio