Exemplo n.º 1
0
        private void CleanSend()
        {
            this.Log();

            m_currSendingPacket = null;

            if (m_saeSend != null)
            {
                m_saeSend.Completed -= OnSendCompleted;
                m_pool.Release(m_saeSend);
                m_saeSend = null;
            }
        }
Exemplo n.º 2
0
        private void CleanReceive()
        {
            this.Log();

            if (m_saeReceive != null)
            {
                m_saeReceive.Completed -= OnReceiveCompleted;
                m_pool.Release(m_saeReceive);
                m_saeReceive = null;
            }
        }
Exemplo n.º 3
0
        private void OnSendCompleted(object sender, SocketAsyncEventArgs e)
        {
            if (e.SocketError != SocketError.Success)
            {
                if (e.SocketError != SocketError.Success)
                {
                    OnError(new SocketException((int)e.SocketError));
                }

                Close();
            }

            _sendArgsPool.Release(e);
        }