How to establish a connection
Controller on one connection. To get a connections just create an instance of the XSocketClient.
var conn = new XSocketClient("ws://localhost:4502", "http://localhost", "chat"); await conn.Open();
- The first parameter is the endpoint of the server
- The second parameter is the origin of the client
- The third parameter is params string for setting your controllers
Note: If you use
AutoReconnect the Open method will try to connect until is has success. To abort reconnection attempts you can use the
OnAutoReconnectFailed events. See autoreconnect for more information.