예제 #1
0
 protected override void BeginSendFromQueue(MessageWrapper message)
 {
     try
     {
         Listener.BeginSend(message.Data, 0, message.Data.Length, SocketFlags.None, SendCallback, message);
     }
     catch (Exception ex)
     {
         RaiseErrorThrown(ex);
     }
 }
 protected override void BeginSendFromQueue(Message message)
 {
     try
     {
         if (message.MessageType == MessageType.Partial)
         {
             Listener.BeginSend(message.MessageBytes, 0, message.MessageBytes.Length, SocketFlags.None, SendCallbackPartial, Listener);
         }
         if (message.MessageType == MessageType.Complete)
         {
             Listener.BeginSend(message.MessageBytes, 0, message.MessageBytes.Length, SocketFlags.None, SendCallback, Listener);
         }
     }
     catch (Exception ex)
     {
         InvokeMessageFailed(message.MessageBytes, ex);
     }
 }