Test.Application.UnRegisterProtocol C# (CSharp) Méthode

UnRegisterProtocol() public méthode

public UnRegisterProtocol ( BaseProtocol pProtocol ) : void
pProtocol CSharpRTMP.Core.Protocols.BaseProtocol
Résultat void
        public override void UnRegisterProtocol(BaseProtocol pProtocol)
        {
            var userList = SOManager["userList"];
            var room = SOManager["room"];
            lock (room)
            {
                base.UnRegisterProtocol(pProtocol);
                if (OnlineClient.ContainsValue(pProtocol))
                {
                    var clientId = OnlineClient.Single(x => x.Value == pProtocol).Key;
                    if (room["publisher1"] != null && room["publisher1"]["id"] == clientId) room.UnSet("publisher1");
                    if (room["publisher2"] != null && room["publisher2"]["id"] == clientId) room.UnSet("publisher2");
                    if (room["adminId"] != null && room["adminId"]["id"] == clientId)
                    {
                        room.UnSet("adminId");
                        room.UnSet("ppt");
                        room.UnSet("pptPageNum");
                    }
                    room.Track();
                    OnlineClient.Remove(clientId);
                    userList.UnSet(clientId);
                    userList.Track();
                }
            }
        }