Example #1
0
            public void Add(byte[] obj)
            {
                if (Reconstructor == null)
                {
                    throw new Exception("got binary data when not reconstructing a packet");
                }

                var packet = Reconstructor.TakeBinaryData(obj);

                if (packet != null)
                {
                    Reconstructor = null;
                    Emit(EVENT_DECODED, packet);
                }
            }
Example #2
0
 public void Add(byte[] obj)
 {
     if (this.Reconstructor == null)
     {
         throw new SocketIOException("got binary data when not reconstructing a packet");
     }
     else
     {
         var packet = this.Reconstructor.TakeBinaryData(obj);
         if (packet != null)
         {
             this.Reconstructor = null;
             this.Emit(EVENT_DECODED, packet);
         }
     }
 }
Example #3
0
            public void Add(string obj)
            {
                Packet packet = decodeString(obj);

                if (packet.Type == BINARY_EVENT || packet.Type == BINARY_ACK)
                {
                    this.Reconstructor = new BinaryReconstructor(packet);

                    if (this.Reconstructor.reconPack.Attachments == 0)
                    {
                        this.Emit(EVENT_DECODED, packet);
                    }
                }
                else
                {
                    this.Emit(EVENT_DECODED, packet);
                }
            }
Example #4
0
 public void Add(byte[] obj)
 {
     if (this.Reconstructor == null)
     {
         throw new SocketIOException("got binary data when not reconstructing a packet");
     }
     else
     {
         var packet = this.Reconstructor.TakeBinaryData(obj);
         if (packet != null)
         {
             this.Reconstructor = null;
             this.Emit(EVENT_DECODED, packet);
         }
     }
 }
Example #5
0
            public void Add(string obj)
            {
                Packet packet = decodeString(obj);
                if (packet.Type == BINARY_EVENT || packet.Type == BINARY_ACK)
                {
                    this.Reconstructor = new BinaryReconstructor(packet);

                    if (this.Reconstructor.reconPack.Attachments == 0)
                    {
                        this.Emit(EVENT_DECODED, packet);
                    }
                }
                else
                {
                    this.Emit(EVENT_DECODED, packet);
                }
            }