Ejemplo n.º 1
0
        public void Stop()
        {
            _proxy.Stop();
            try
            {
                _fromSocket.Unbind(_fromAddress);
            }
            catch (ObjectDisposedException)
            {
                // Ignored
            }
            _fromSocket.Close();
            _fromSocket.Dispose();

            try
            {
                _toSocket.Unbind(_toAddress);
            }
            catch (ObjectDisposedException)
            {
                // Ignored
            }
            _toSocket.Close();
            _toSocket.Dispose();
        }
Ejemplo n.º 2
0
        protected void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing)
                {
                    _proxy.Stop();
                    _proxy = null;

                    _poller.Dispose();
                    _poller = null;

                    _backendSocket.Dispose();
                    _backendSocket = null;

                    _frontendSocket.Dispose();
                    _frontendSocket = null;
                }

                _disposedValue = true;
            }
        }