Beispiel #1
0
        public Session(int id, Socket socket, INetworkEventHandler handler, INetworkFilter filter, bool needSsl = false)
        {
            m_Id = id;

            m_Stream = new NetworkStream(socket, true);
            if (needSsl) m_Stream = new SslStream(m_Stream, false);

            m_IoHandler = handler;
            m_IoFilter = filter;

            UserData = null;
        }
Beispiel #2
0
 public virtual void SetIoHandler(INetworkEventHandler handler)
 {
     m_IoHandler = handler;
 }
Beispiel #3
0
        public Session(int id, Socket socket, INetworkEventHandler handler, INetworkFilter filter, 
                        RemoteCertificateValidationCallback validationCallback)
        {
            m_Id = id;

            m_Stream = new SslStream(new NetworkStream(socket, true), false, validationCallback);

            m_IoHandler = handler;
            m_IoFilter = filter;

            UserData = null;
        }