예제 #1
0
파일: WsServerPeer.cs 프로젝트: poup/MST
        public WsServerPeer(WsService session)
        {
            serviceForPeer = session;

            serviceForPeer.OnOpenEvent  += () => { _isConnected = true; };
            serviceForPeer.OnCloseEvent += (msg) => { _isConnected = false; };
            serviceForPeer.OnErrorEvent += (msg) => { _isConnected = false; };

            //_delayedMessages = new Queue<byte[]>();

            _isConnected = true;
        }
예제 #2
0
파일: WsServerPeer.cs 프로젝트: jraicr/MST
        public WsServerPeer(WsService session)
        {
            _session = session;

            _session.OnOpenEvent  += () => { _isConnected = true; };
            _session.OnCloseEvent += (msg) => { _isConnected = false; };
            _session.OnErrorEvent += (msg) => { _isConnected = false; };

            _delayedMessages = new Queue <byte[]>();

            // When we're creating a peer in server, it's considered that there's
            // already a connection for which we're making it.
            _isConnected = true;
        }