CSharpRTMP.Core.Protocols.Rtmfp.FlowWriter.WriteStatusResponse C# (CSharp) Method

WriteStatusResponse() public method

public WriteStatusResponse ( string code, string description ) : void
code string
description string
return void
        public void WriteStatusResponse(string code, string description)
        {
            WriteAMFResponse("onStatus", code, description).Dispose();
        }

Usage Example

Beispiel #1
0
        public void Start(Peer peer, uint publisherId, FlowWriter controller)
        {
            if (PublisherId != 0)
            {
                if (controller != null)
                {
                    controller.WriteStatusResponse("Publish.BadName", Name + "is already published");
                }
            }
            PublisherId = publisherId;

            //string error;
            //if (!peer.OnPublish(this, out error))
            //{
            //    if (String.IsNullOrEmpty(error)) error = "Not allowed to publish " + Name;
            //}
            _publisher     = peer;
            _controller    = controller;
            _firstKeyFrame = false;
            foreach (var baseOutStream in OutStreams.OfType <IOutNetStream>())
            {
                baseOutStream.SendPublishNotify();
            }
            if (controller != null)
            {
                controller.WriteStatusResponse("Publish.Start", Name + "is now published");
            }
        }
All Usage Examples Of CSharpRTMP.Core.Protocols.Rtmfp.FlowWriter::WriteStatusResponse