コード例 #1
0
        public void EndSendTo(TcpSocketSession session, IAsyncResult asyncResult)
        {
            GuardRunning();

            if (session == null)
            {
                throw new ArgumentNullException("session");
            }

            TcpSocketSession writeSession = null;

            if (_sessions.TryGetValue(session.SessionKey, out writeSession))
            {
                session.EndSend(asyncResult);
            }
        }
コード例 #2
0
        public void EndSendTo(string sessionKey, IAsyncResult asyncResult)
        {
            GuardRunning();

            if (string.IsNullOrEmpty(sessionKey))
            {
                throw new ArgumentNullException("sessionKey");
            }

            TcpSocketSession session = null;

            if (_sessions.TryGetValue(sessionKey, out session))
            {
                session.EndSend(asyncResult);
            }
        }