CSharpRTMP.Core.Protocols.Rtsp.OutboundConnectivity.OutboundConnectivity C# (CSharp) Method

OutboundConnectivity() public method

public OutboundConnectivity ( bool forceTcp, RtspProtocol pRTSPProtocol ) : System
forceTcp bool
pRTSPProtocol RtspProtocol
return System
        public OutboundConnectivity(bool forceTcp, RtspProtocol pRTSPProtocol)
        {
            _forceTcp = forceTcp;
            _rtspProtocol = pRTSPProtocol;
            _dataMessage = new MsgHdr();
            _rtcpMessage = new MsgHdr {Buffers = new[] {new byte[28]}};
            _rtcpMessage.Buffers[0][0] = 0x80;
            _rtcpMessage.Buffers[0][1] = 0xc8;
            _rtcpMessage.Buffers[0].Write(2, (ushort) 6);
            _rtcpNTP = new BufferWithOffset(_rtcpMessage.Buffers[0], 8);
            _rtcpRTP = new BufferWithOffset(_rtcpMessage.Buffers[0], 16);
            _rtcpSPC = new BufferWithOffset(_rtcpMessage.Buffers[0], 20);
            _rtcpSOC = new BufferWithOffset(_rtcpMessage.Buffers[0], 24);
            _startupTime = DateTime.Now;
        }