public static RtspResponse CreateResponse(this RtspRequestOptions t, string options) { RtspResponse response = t.CreateResponse(); response.Headers[RtspHeaderNames.Public] = options; return(response); }
internal RtspResponse HandleOptions(RtspRequestOptions request) { Contract.Requires(request != null); Contract.Ensures(Contract.Result <RtspResponse>() != null); var response = request.CreateResponse(); response.ReturnCode = 200; return(response); }
private void RTSP_ProcessOptionsRequest(RtspRequestOptions message, RtspListener listener) { String requested_url = message.RtspUri.ToString(); _logger.Info($"Connection {listener.ConnectionId} requested for url: {requested_url}"); _videoSource = _requestUrlVideoSourceResolverStrategy.ResolveVideoSource(requested_url); OnConnectionAdded?.Invoke(Id, _videoSource); //treat connection useful when VideoSource determined // Create the reponse to OPTIONS Rtsp.Messages.RtspResponse options_response = message.CreateResponse(_logger); // Rtsp.Messages.RtspResponse options_response = OnRtspMessageReceived?.Invoke(message as Rtsp.Messages.RtspRequest,targetConnection); listener.SendMessage(options_response); }