title: How to register events with socket.io namespaces using socketio4Net?
body: <p>I am using SocketIO4Net to create a .NET socket.io client in my worker role with which i can connect to my socket.io server. I have been able to connect to the namespace after shifting around a lot of code than what was mentioned in the documentation. But I am still not able to send and receive messages to events. Below is my code, please let me know how I can register events to the socket.io .net client. Its really important for my project that i am able to send messages to socket.io server events from my worker role.</p>
  
  <pre><code>broadcastSocketClient = new Client(localSocketUrl);
  
                  broadcastSocketClient.Opened += SocketOpened;
                  broadcastSocketClient.Message += SocketMessage;
                  broadcastSocketClient.SocketConnectionClosed += SocketConnectionClosed;
                  broadcastSocketClient.Error += SocketError;
  
                  while (!broadcastSocketClient.IsConnected)
                  {
                      broadcastSocketClient.Connect();
                  }
  
                  // register for 'connect' event with io server
                  broadcastSocketClient.On("connect", (cn) =&gt;
                  {                      
  
                      var namespaceConnect = broadcastSocketClient.Connect("/namespacename");
  
                      // register for 'connect' event with io server
                      namespaceConnect.On("connect", (data) =&gt;
                      {
                          namespaceConnect.Emit("test", "CONNECTED");
  
                          namespaceConnect.On("first", (message) =&gt;
                          {
                              Console.WriteLine(message);
  
                          });
                      });    
                  });                    
  </code></pre>