CSharpRTMP.Core.Protocols.Rtsp.RtspProtocol.PushResponseHeader C# (CSharp) Méthode

PushResponseHeader() public méthode

public PushResponseHeader ( string name, string value ) : void
name string
value string
Résultat void
        public void PushResponseHeader(string name, string value) => _responseHeaders[RTSP_HEADERS,name] = value;

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::PushResponseHeader