Esempio n. 1
0
        public void deleteStream(IStreamCapableConnection connection, int streamId)
        {
            IClientStream stream = connection.GetStreamById(streamId);

            if (stream != null)
            {
                if (stream is IClientBroadcastStream)
                {
                    IClientBroadcastStream bs      = stream as IClientBroadcastStream;
                    IBroadcastScope        bsScope = GetBroadcastScope(connection.Scope, bs.PublishedName);
                    if (bsScope != null && connection is BaseConnection)
                    {
                        (connection as BaseConnection).UnregisterBasicScope(bsScope);
                    }
                }
                stream.Close();
            }
            connection.UnreserveStreamId(streamId);
        }
Esempio n. 2
0
        public void deleteStream(IStreamCapableConnection connection, int streamId)
        {
            IClientStream streamById = connection.GetStreamById(streamId);

            if (streamById != null)
            {
                if (streamById is IClientBroadcastStream)
                {
                    IClientBroadcastStream stream2        = streamById as IClientBroadcastStream;
                    IBroadcastScope        broadcastScope = this.GetBroadcastScope(connection.Scope, stream2.PublishedName);
                    if ((broadcastScope != null) && (connection is BaseConnection))
                    {
                        (connection as BaseConnection).UnregisterBasicScope(broadcastScope);
                    }
                }
                streamById.Close();
            }
            connection.UnreserveStreamId(streamId);
        }
        public void deleteStream(IStreamCapableConnection connection, int streamId)
        {
		    IClientStream stream = connection.GetStreamById(streamId);
		    if (stream != null) 
            {
			    if (stream is IClientBroadcastStream) 
                {
				    IClientBroadcastStream bs = stream as IClientBroadcastStream;
				    IBroadcastScope bsScope = GetBroadcastScope(connection.Scope, bs.PublishedName);
				    if (bsScope != null && connection is BaseConnection) 
                    {
                        (connection as BaseConnection).UnregisterBasicScope(bsScope);
				    }
			    }
			    stream.Close();
		    }
		    connection.UnreserveStreamId(streamId);
        }