Team XSockets.NET

How to establish a connection

Just like in the JavaScript client you can multiplex over several 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 OnConnectAttempt and OnAutoReconnectFailed events. See autoreconnect for more information.

results matching ""

    No results matching ""