Ejemplo n.º 1
0
        private void OnAsyncRead(IAsyncResult result)
        {
            if (!CheckIsConnect)
            {
                return;
            }

            try
            {
                NetworkStream stream  = result.AsyncState as NetworkStream;
                int           byteLen = stream.EndRead(result);
                ServerLog.Log(string.Format("收到:{0}", byteLen));
                GoOnRead(m_receiveData, byteLen);
            }
            catch (SocketException exp)
            {
                AnalyzeException(exp);
            }
        }