Exemplo n.º 1
0
 /// <summary>
 /// <see cref="ISniffer.ReceiveMessage"/>
 /// </summary>
 public ReceivedMsgReturnCode ReceiveMessage(out DvtkData.Message message)
 {
     message = null;
     Wrappers.ReceivedMsgReturnCode wrappersReceiveReturnCode =
         (this.m_adaptee as Wrappers.MSnifferSession).ReceiveMessage(out message);
     return(_Convert(wrappersReceiveReturnCode));
 }
Exemplo n.º 2
0
        private ReceivedMsgReturnCode _Convert(Wrappers.ReceivedMsgReturnCode receiveReturnCode)
        {
            switch (receiveReturnCode)
            {
            case Wrappers.ReceivedMsgReturnCode.Success:                return(ReceivedMsgReturnCode.Success);

            case Wrappers.ReceivedMsgReturnCode.Failure:                return(ReceivedMsgReturnCode.Failure);

            case Wrappers.ReceivedMsgReturnCode.IncompleteByteStream:   return(ReceivedMsgReturnCode.IncompleteByteStream);

            case Wrappers.ReceivedMsgReturnCode.DecodingError:                      return(ReceivedMsgReturnCode.DecodingError);

            default:
                // Unknown Wrappers.ReceiveReturnCode
                throw new System.NotImplementedException();
            }
        }