Exemple #1
0
 private void OnMessageArrived(ITcpConnection connection, byte[] message)
 {
     try
     {
         _messageArrivedHandler(connection, message, reply => connection.QueueMessage(reply));
     }
     catch (Exception ex)
     {
         _logger.Error("Handle message error.", ex);
     }
 }
 private void OnMessageArrived(ITcpConnection connection, byte[] message)
 {
     try
     {
         _messageArrivedHandler(connection, message, reply =>
         {
             Task.Factory.StartNew(() => connection.QueueMessage(reply));
         });
     }
     catch (Exception ex)
     {
         _logger.Error(string.Format("Socket server handle message has exception, name: {0}, listeningEndPoint: {1}", _name, _listeningEndPoint), ex);
     }
 }
Exemple #3
0
 private void OnMessageArrived(ITcpConnection connection, byte[] message)
 {
     try
     {
         _messageArrivedHandler(connection, message, reply =>
         {
             Task.Factory.StartNew(() => connection.QueueMessage(reply));
         });
     }
     catch (Exception ex)
     {
         LogUtil.Error("Handle message error.", ex);
     }
 }
Exemple #4
0
 private void OnMessageArrived(ITcpConnection connection, byte[] message)
 {
     try
     {
         _messageArrivedHandler(connection, message, reply => connection.QueueMessage(reply));
     }
     catch (Exception ex)
     {
         _logger.Error("Handle message error.", ex);
     }
 }