private void BeginReadCallbackProcessing(IAsyncResult ar)
        {
            byte[] buffer = ar.AsyncState as byte[];
            _lock.AcquireReaderLock();
            try
            {
                if (IsClosed || IsClosing || IsDisconnecting)
                {
                    SocketBufferPool.CheckIn(buffer);
                    return; // Already shutting down.
                }
            }
            finally
            {
                _lock.ReleaseReaderLock();
            }
            //log4net.ThreadContext.Properties["ClientIP"] = this.RemoteEndPoint;
            // NOTE TODO Common.Logging get clientIP
            if (log.IsDebugEnabled)
            {
                log.Debug(__Res.GetString(__Res.Rtmp_SocketBeginRead, _connectionId));
            }

            try
            {
                _lastAction = DateTime.Now;
                int readBytes = _rtmpNetworkStream.EndRead(ar);
                _readBytes.Increment(readBytes);
                if (readBytes > 0)
                {
                    _readBuffer.Append(buffer, 0, readBytes);
                    while (_rtmpNetworkStream.DataAvailable)
                    {
                        readBytes = _rtmpNetworkStream.Read(buffer, 0, buffer.Length);
                        _readBuffer.Append(buffer, 0, readBytes);
                        _readBytes.Increment(readBytes);
                    }
                    //Leave IOCP thread
                    ThreadPoolEx.Global.QueueUserWorkItem(new WaitCallback(OnReceivedCallback), null);
                }
                else
                {
                    // No data to read
                    //Close();
                    BeginDisconnect();
                }
            }
            catch (ObjectDisposedException)
            {
                //The underlying socket may be closed
            }
            catch (Exception ex)
            {
                HandleError(ex);
            }
            finally
            {
                SocketBufferPool.CheckIn(buffer);
            }
        }