/// <summary>
 /// When TCPConnectionListener handles a connection, it is taken by this method to create and 
 /// register it's neccessary events and to add it to _communicators collection. 
 /// This method is also starts the communicator.
 /// </summary>
 /// <param name="sender">Sending object</param>
 /// <param name="e">Event informations</param>
 private void ConnectionListener_ClientConnected(object sender, TCPClientConnectedEventArgs e)
 {
     try
     {
         OnCommunicatorConnected(new TCPCommunicator(e.ClientSocket, CommunicationLayer.CreateCommunicatorId()));
     }
     catch (Exception ex)
     {
         Logger.Error(ex.Message, ex);
     }
 }
Beispiel #2
0
 /// <summary>
 /// When TCPConnectionListener handles a connection, it is taken by this method to create and
 /// register it's neccessary events and to add it to _communicators collection.
 /// This method is also starts the communicator.
 /// </summary>
 /// <param name="sender">Sending object</param>
 /// <param name="e">Event informations</param>
 private void ConnectionListener_ClientConnected(object sender, TCPClientConnectedEventArgs e)
 {
     try
     {
         OnCommunicatorConnected(new TCPCommunicator(e.ClientSocket, CommunicationLayer.CreateCommunicatorId()));
     }
     catch (Exception ex)
     {
         Logger.Error(ex.Message, ex);
     }
 }