Ejemplo n.º 1
0
        public void SendCancelRequest(OutgoingMessages msgType, int version, CodeMsgPair error)
        {
            List <byte> paramsList = new List <byte>();

            paramsList.AddParameter(msgType);
            paramsList.AddParameter(version);
            try
            {
                Send(paramsList);
            }
            catch (Exception e)
            {
                throw new Exception(String.Format("Exception. Code: {0}, Msg: {1}", error.Code, error.Message), e);
            }
        }
Ejemplo n.º 2
0
 public static void AddParameter(this BinaryWriter source, OutgoingMessages msgId)
 {
     AddParameter(source, (int)msgId);
 }
Ejemplo n.º 3
0
 public static void AddParameter(this BinaryWriter source, OutgoingMessages msgId)
 {
     AddParameter(source, (int)msgId);
 }
Ejemplo n.º 4
0
        protected void SendCancelRequest(OutgoingMessages msgType, int version, CodeMsgPair errorMessage)
        {
            var paramsList = new BinaryWriter(new MemoryStream());
            var lengthPos = prepareBuffer(paramsList);

            paramsList.AddParameter(msgType);
            paramsList.AddParameter(version);
            try
            {
                lock (this)
                {
                    CloseAndSend(paramsList, lengthPos);
                }
            }
            catch (Exception)
            {
                wrapper.error(IncomingMessage.NotValid, errorMessage.Code, errorMessage.Message);
                Close();
            }
        }
Ejemplo n.º 5
0
 public static void AddParameter(this List <byte> source, OutgoingMessages msgId)
 {
     AddParameter(source, (int)msgId);
 }
Ejemplo n.º 6
0
 protected void SendCancelRequest(OutgoingMessages msgType, int version, CodeMsgPair errorMessage)
 {
     List<byte> paramsList = new List<byte>();
     paramsList.AddParameter(msgType);
     paramsList.AddParameter(version);
     try
     {
         lock (this)
         {
             Send(paramsList);
         }
     }
     catch (Exception)
     {
         wrapper.error(IncomingMessage.NotValid, errorMessage.Code, errorMessage.Message);
         Close();
     }
 }
Ejemplo n.º 7
0
 public static void AddParameter(this List<byte> source, OutgoingMessages msgId)
 {
     AddParameter(source, (int)msgId);
 }