Exemplo n.º 1
0
        public void Stop()
        {
            isRunning = false;
            responseSocket.Close();
            responseSocket.Dispose();

            listenThread.Join(100);
            logger.Info("Message puller has stopped");
        }
Exemplo n.º 2
0
 protected override void OnStopped()
 {
     base.OnStopped();
     _pullSocket.Close();
     _pullSocket.Dispose();
     _pushSocket.Close();
     _pushSocket.Dispose();
     _netMqContext.Dispose();
 }
        public void Close()
        {
            this.running = false;

            if (responder != null)
            {
                try
                {
                    responder.Disconnect(endpoint);
                }
                catch (Exception ex)
                {
                }
                finally
                {
                    responder.Dispose();
                }
            }
        }
    public override void OnUnregistered()
    {
        base.OnUnregistered();

        Debug.Assert(_zmqPredictedMotion != null);
        _zmqPredictedMotion.Close();
        _msgRecv.Close();

        _zmqPredictedMotion.Dispose();
        _zmqPredictedMotion = null;

        _lastCenterEyePosition = Vector3.zero;
    }
    public void Close()
    {
        if (_zmqPredictedMotion == null)
        {
            return;
        }

        _zmqPredictedMotion.Close();
        _msgRecv.Close();

        _zmqPredictedMotion.Dispose();
        _zmqPredictedMotion = null;
    }
Exemplo n.º 6
0
 void IDisposable.Dispose()
 {
     tokenSource.Cancel();
     if (publisher != null)
     {
         publisher.Dispose();
     }
     if (receiver != null)
     {
         receiver.Dispose();
     }
     if (context != null)
     {
         context.Dispose();
     }
 }
Exemplo n.º 7
0
 protected void Cleanup()
 {
     ClientFiber.Enqueue(() =>
     {
         Console.WriteLine("Dispose push");
         Push.Dispose();
         Context2.Dispose();
         Thread.Sleep(10);
         Console.WriteLine("Dispose pull");
         Pull.Dispose();
         Context1.Dispose();
         Thread.Sleep(10);
     });
     Thread.Sleep(200);
     ClientFiber.Dispose();
 }
Exemplo n.º 8
0
        private void InboundProc()
        {
            var inboundSocket = new PullSocket(InboundEndPoint);

            using (inboundSocket)
            {
                while (_isListening)
                {
                    var inputStream = inboundSocket.ReceiveFrameBytes();

                    DeserializeAndForwardTransportMessage(inputStream);
                }

                inboundSocket.Dispose();
            }
        }
Exemplo n.º 9
0
        public void Dispose()
        {
            if (!IsRunning)
            {
                return;
            }

            _mainThread.Stop();
            _sendThread.Stop();
            _receThread.Stop();

            _pullSocket.Unbind(Address + "in");
            _pullSocket.Dispose();
            _pushSocket.Disconnect(Address + "out");
            _pushSocket.Dispose();
            _netMqContext.Dispose();
            IsRunning = false;
            Logger.Trace("game server stopped");
        }
 public void Dispose()
 {
     _client.Dispose();
     _context.Dispose();
 }
Exemplo n.º 11
0
 public void Dispose()
 {
     _client.Dispose();
 }