Пример #1
0
    static void ReceiveCallback(IAsyncResult ar)
    {
        UdpRevicer self   = (UdpRevicer)ar.AsyncState;
        IPEndPoint remote = null;

        byte[] receiveBytes = self.client.EndReceive(ar, ref remote);
        self.Received.Invoke(self, remote, receiveBytes);
    }
Пример #2
0
 void ur_Received(UdpRevicer self, System.Net.IPEndPoint arg2, byte[] data)
 {
     if (!_isPlay)
         return;
     ur.beginReceive();
     RTPModel pkg = new RTPModel(data);
     queue.Enqueue(FrameHelper.getFrame(pkg.payload));
     recvFrameed.Invoke(this, pkg.SequenceNumber, pkg.TimeStamp);
 }
Пример #3
0
        void ur_Received(UdpRevicer self, System.Net.IPEndPoint arg2, byte[] data)
        {
            if (!_isPlay)
            {
                return;
            }
            ur.beginReceive();
            RTPModel pkg = new RTPModel(data);

            queue.Enqueue(FrameHelper.getFrame(pkg.payload));
            recvFrameed.Invoke(this, pkg.SequenceNumber, pkg.TimeStamp);
        }
Пример #4
0
 public ClientPlayer()
 {
     ur           = new UdpRevicer();
     ur.Received += new Action <UdpRevicer, System.Net.IPEndPoint, byte[]>(ur_Received);
 }
Пример #5
0
 public ClientPlayer()
 {
     ur = new UdpRevicer();
     ur.Received += new Action<UdpRevicer, System.Net.IPEndPoint, byte[]>(ur_Received);
 }