CSharpRTMP.Core.Protocols.Rtsp.RtspProtocol.SendResponseMessage C# (CSharp) 메소드

SendResponseMessage() 공개 메소드

public SendResponseMessage ( ) : bool
리턴 bool
        public bool SendResponseMessage()
        {
           
            //1. Put the first line
            OutputBuffer.Write(
                    _responseHeaders[RTSP_FIRST_LINE, RTSP_VERSION] +" "+ _responseHeaders[RTSP_FIRST_LINE, RTSP_STATUS_CODE] + " " + _responseHeaders[RTSP_FIRST_LINE, RTSP_STATUS_CODE_REASON] + "\r\n");

            //2. send the mesage
            return SendMessage(_responseHeaders, _responseContent);
        }

Usage Example

        private bool SendAuthenticationChallenge(RtspProtocol from, Variant realm)
        {
            //10. Ok, the user doesn't know that this needs authentication. We
            //will respond back with a nice 401. Generate the line first
            string wwwAuthenticate = HTTPAuthHelper.GetWWWAuthenticateHeader(
                    realm["method"],
                    realm["name"]);

            //12. Save the nonce for later validation when new requests are coming in again
            from.CustomParameters["wwwAuthenticate"] = wwwAuthenticate;

            //13. send the response
            from.PushResponseFirstLine(RTSP_VERSION_1_0, 401, "Unauthorized");
            from.PushResponseHeader(HTTP_HEADERS_WWWAUTHENTICATE, wwwAuthenticate);
            return from.SendResponseMessage();
        }
All Usage Examples Of CSharpRTMP.Core.Protocols.Rtsp.RtspProtocol::SendResponseMessage