protected AbstractSenderSocket(ISerializer serializer, IAddressBinder addressBinder, NetMQSocket socket) { _serializer = serializer; _addressBinder = addressBinder; _socket = socket; _addressBinder.ConnectOrBindAddress(socket); }
public IntermediarySocket(IAddressBinder frontendAddressBinder, IAddressBinder backendAddressBinder, XSubscriberSocket frontendSocket, XPublisherSocket backendSocket) { _frontendAddressBinder = frontendAddressBinder; _backendAddressBinder = backendAddressBinder; _frontendSocket = frontendSocket; _backendSocket = backendSocket; _frontendAddressBinder.ConnectOrBindAddress(_frontendSocket); _backendAddressBinder.ConnectOrBindAddress(_backendSocket); _poller = new Poller(_frontendSocket, _backendSocket); _proxy = new Proxy(frontendSocket, backendSocket, poller: _poller); }
public IntermediarySocket(IAddressBinder frontendAddressBinder, IAddressBinder backendAddressBinder, XSubscriberSocket frontendSocket, XPublisherSocket backendSocket) { _frontendAddressBinder = frontendAddressBinder; _backendAddressBinder = backendAddressBinder; _frontendSocket = frontendSocket; _backendSocket = backendSocket; _frontendAddressBinder.ConnectOrBindAddress(_frontendSocket); _backendAddressBinder.ConnectOrBindAddress(_backendSocket); _poller = new NetMQPoller { _frontendSocket, _backendSocket }; _proxy = new Proxy(frontendSocket, backendSocket, poller: _poller); }
public void Start() { if (_disposedValue) { throw new ObjectDisposedException("EasyZMqReceiverSocket"); } if (_isStarted) { throw new InvalidOperationException("Subscriber already running!"); } _addressBinder.ConnectOrBindAddress(_socket); _poller.RunAsync(); _isStarted = true; }