Esempio n. 1
0
        public void EndSendTo(TcpSocketSession session, IAsyncResult asyncResult)
        {
            GuardRunning();

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

            if (_sessions.TryGetValue(session.SessionKey, out var writeSession))
            {
                session.EndSend(asyncResult);
            }
        }
Esempio n. 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);
            }
        }