Ejemplo n.º 1
0
        protected override void OnMessage(MessageEventArgs e)
        {
            if (!e.IsBinary)
            {
                return; // Invalid data format. Skipping message.
            }
            var packet = SdpCodec.Decode(e.RawData);

            if (packet == null)
            {
                // failed to decode packet
                return;
            }

            Manager.IncomingPackets.Enqueue(new Tuple <string, ISdpPacket>(ID, packet));
        }
Ejemplo n.º 2
0
        private void Client_OnMessage(object sender, MessageEventArgs e)
        {
            if (!e.IsBinary)
            {
                return; // Invalid data format. Skipping message.
            }
            var packet = SdpCodec.Decode(e.RawData);

            if (packet == null)
            {
                // failed to decode packets
                return;
            }

            Manager.IncomingPackets.Enqueue(new Tuple <string, ISdpPacket>(string.Empty, packet));
        }