SIPSorcery.Net.RTPChannel.SendRTPRaw C# (CSharp) Method

SendRTPRaw() public method

Sends a packet to the RTSP server on the RTP socket.
public SendRTPRaw ( byte payload ) : void
payload byte
return void
        public void SendRTPRaw(byte[] payload)
        {
            try
            {
                if (!_isClosed && _rtpSocket != null && _remoteEndPoint != null && _rtpSocketError == SocketError.Success)
                {
                    _rtpSocket.SendTo(payload, _remoteEndPoint);
                }
            }
            catch (Exception excp)
            {
                if (!_isClosed)
                {
                    logger.Error("Exception RTPChannel.SendRTPRaw attempting to send to " + _remoteEndPoint + ". " + excp);

                    OnRTPSocketDisconnected?.Invoke();
                }
            }
        }