Example #1
0
 private void BeginNewReceive(bool isReset = false)
 {
     if (isReset)
     {
         _receiveProcessor.Reset();
     }
     _receiveProcessor.GetNextReceiveCallbackData(ref _tempReceiveCallbackData);
     _socket.BeginReceive(_tempReceiveCallbackData.Buffer, _tempReceiveCallbackData.Offset, _tempReceiveCallbackData.Size, SocketFlags.None, ReceiveCallback, this);
 }
Example #2
0
 private void BeginNewReceive(bool isReset = false)
 {
     try
     {
         if (isReset)
         {
             _receiveProcessor.Reset();
         }
         _receiveProcessor.GetNextReceiveCallbackData(ref _tempReceiveCallbackData);
         _socket.BeginReceive(_tempReceiveCallbackData.Buffer, _tempReceiveCallbackData.Offset, _tempReceiveCallbackData.Size, SocketFlags.None, ReceiveCallback, this);
     }
     catch (Exception ex)
     {
         LogAgent.Error("tcpTransport BeginNewReceive,socket BeginReceive error", ex);
         Close();
         throw;
     }
 }
Example #3
0
 private void BeginNextReceive()
 {
     _receiveProcessor.GetNextReceiveCallbackData(ref _tempReceiveCallbackData);
     _socket.BeginReceive(_tempReceiveCallbackData.Buffer, _tempReceiveCallbackData.Offset, _tempReceiveCallbackData.Size, SocketFlags.None, ReceiveCallback, this);
 }