public UdpHandshake(ControlHandshakeType type)
 {
     Header = new RtpHeader()
     {
         PayloadType = NanoPayloadType.UDPHandshake
     };
     Type = type;
 }
 public ControlHandshake(ControlHandshakeType type, ushort connectionId)
 {
     Header = new RtpHeader()
     {
         PayloadType = NanoPayloadType.ControlHandshake
     };
     Type         = type;
     ConnectionId = connectionId;
 }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="connectionId"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        private async Task <ControlHandshake> SendControlHandshakeAsync(ushort connectionId,
                                                                        ControlHandshakeType type = ControlHandshakeType.SYN)
        {
            var packet = new Packets.ControlHandshake(type, connectionId)
            {
                Channel = NanoChannel.TcpBase
            };

            return(await _transport.WaitForMessageAsync <ControlHandshake>(
                       TimeSpan.FromSeconds(5),
                       async() => await _transport.SendAsync(packet)));
        }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        private async Task SendUdpHandshakeAsync(
            ControlHandshakeType type = ControlHandshakeType.ACK)
        {
            var packet = new Packets.UdpHandshake(type)
            {
                Channel = NanoChannel.TcpBase
            };

            // FIXME: Wait for first VideoPacket
            // Currently WaitForMessage is broken and blocks VideoData
            // populating to MessageReceived events
            await _transport.SendAsync(packet);
        }
 public ControlHandshake(ControlHandshakeType type, ushort connectionId)
 {
     Type         = type;
     ConnectionId = connectionId;
 }
 public void Deserialize(EndianReader br)
 {
     Type = (ControlHandshakeType)br.ReadByte();
 }
예제 #7
0
 public UdpHandshake(ControlHandshakeType type)
 {
     Type = type;
 }