Disconnect() public method

Send disconnect message to client.
public Disconnect ( ) : void
return void
Exemplo n.º 1
0
        internal void Push(NSocketSAEAItem item)
        {
            if (item == null)
                throw new ArgumentNullException("SocketAsyncEventArgsWithId对象为空");


            if (busyPool.Keys.Contains(item.UID))
            {
                lock (busyPool)
                {
                    busyPool.Remove(item.UID);
                }
            }

            item.UID = "-1";
            item.Disconnect();
            lock (this.idlePool)
            {
                this.idlePool.Enqueue(item);
            }
        }
Exemplo n.º 2
0
        internal void Push(NSocketSAEAItem item)
        {
            if (item == null)
                throw new ArgumentNullException("SocketAsyncEventArgsWithId对象为空");

            if (busyPool.Keys.Contains(item.UID))
            {
                lock (busyPool)
                {
                    busyPool.Remove(item.UID);
                }
            }

            item.UID = "-1";
            item.Disconnect();
            lock (this.idlePool)
            {
                this.idlePool.Enqueue(item);
            }
        }