Example #1
0
        private void OnSocketClosing(SocketAsyncEventArgs e)
        {
            var token = e.UserToken as DataToken;

            _sessionPool.Remove(token.Socket);
            _readWritePool.Push(e);
            if (SocketClosing != null)
            {
                SocketClosing.BeginInvoke(new SocketProcessEventArgs()
                {
                    Socket = token.Socket
                }, null, null);
            }
            _saeaProxy.CloseConnect(e);
        }