Ejemplo n.º 1
0
 protected override void ClientProcessing(ecoMessage msg)
 {
     try
     {
         BillingContext c        = (BillingContext)msg._c;
         ulong          arg_12_0 = msg._header;
         byte[]         arg_1E_0 = (byte[])msg._attached;
         new List <byte[]>();
         BufferState bufferState = new BufferState();
         bufferState._buffer = (byte[])msg._attached;
         int           num  = 0;
         List <byte[]> list = this._receiver.ReceivedBuffer(bufferState, bufferState._buffer.Length, ref num);
         if (list != null)
         {
             foreach (byte[] current in list)
             {
                 msg._from.AsyncSend(c, current);
             }
         }
     }
     catch (Exception ex)
     {
         Common.WriteLine(ex.Message, new string[0]);
     }
 }
Ejemplo n.º 2
0
 public virtual void PutMesssage(IConnectInterface receiver, object c, int type, ulong header, object message)
 {
     lock (this._lockHandler)
     {
         ecoMessage ecoMessage = new ecoMessage(receiver, c, type, header, message);
         if (ecoMessage != null && this._queueEcoMessage != null)
         {
             this._queueEcoMessage.Enqueue(ecoMessage);
             this._eventMessage.Set();
         }
     }
 }
Ejemplo n.º 3
0
 private void MessageThread(object state)
 {
     Common.WriteLine(this._threadName + " thread started", new string[0]);
     while (this._stopping == 0)
     {
         int num = WaitHandle.WaitAny(this._waitHandles, 100);
         if (num == 0)
         {
             break;
         }
         ecoMessage ecoMessage = null;
         lock (this._lockHandler)
         {
             if (this._queueEcoMessage.Count > 0)
             {
                 ecoMessage = this._queueEcoMessage.Dequeue();
             }
             else
             {
                 this._eventMessage.Reset();
             }
         }
         if (ecoMessage != null)
         {
             if (this._isServer)
             {
                 this.ServerProcessing(ecoMessage);
             }
             else
             {
                 this.ClientProcessing(ecoMessage);
             }
         }
     }
     Common.WriteLine("[" + this._threadName + "] thread end", new string[0]);
     this._stoppedEvent.Set();
 }
Ejemplo n.º 4
0
 protected virtual void ServerProcessing(ecoMessage msg)
 {
 }
Ejemplo n.º 5
0
 protected virtual void ClientProcessing(ecoMessage msg)
 {
 }
Ejemplo n.º 6
0
 public virtual void FirstDispatch(ecoMessage msg)
 {
 }