Beispiel #1
0
        private void RunLoop()
        {
            Uv = new Uv();

            Loop = new UvLoopHandle();
            Loop.Init(Uv);

            _postHandle = new UvAsyncHandle();
            _postHandle.Init(Loop, OnPost, null);

            _running.Set();

            Uv.run(Loop, 0);

            _postHandle.Reference();
            _postHandle.Dispose();

            Uv.run(Loop, 0);

            Loop.Dispose();
        }
Beispiel #2
0
        private void RunLoop()
        {
            Uv = new Uv();

            Loop = new UvLoopHandle();
            Loop.Init(Uv);

            _postHandle = new UvAsyncHandle();
            _postHandle.Init(Loop, OnPost, _queueCloseCallback);

            _running.Set();

            Uv.run(Loop, 0);
        }
Beispiel #3
0
        private void RunLoop()
        {
            Uv = new Uv();

            Loop = new UvLoopHandle();
            Loop.Init(Uv);

            _shutdownPostHandle = new UvAsyncHandle();
            _shutdownPostHandle.Init(Loop, OnPost, _queueCloseCallback);

            _listenSocket = new UvTcpHandle();
            _listenSocket.Init(Loop, _queueCloseCallback);
            _listenSocket.NoDelay(true);
            _listenSocket.Bind(new IPEndPoint(_ip, _port));

            _listenSocket.Listen(10, _onConnectionCallback, this);

            Uv.run(Loop, 0);
        }
Beispiel #4
0
        private void RunLoop()
        {
            Uv = new Uv();

            Loop = new UvLoopHandle();
            Loop.Init(Uv);

            _shutdownPostHandle = new UvAsyncHandle();
            _shutdownPostHandle.Init(Loop, OnPost, _queueCloseCallback);

            _connectSocket = new UvTcpHandle();
            _connectSocket.Init(Loop, _queueCloseCallback);
            _connectSocket.NoDelay(true);

            var connectReq = new UvConnectRequest();

            connectReq.Init(Loop);
            connectReq.Connect(_connectSocket, new IPEndPoint(_ip, _port), OnConnection, this);

            Uv.run(Loop, 0);
        }