/// <summary> /// Initializes a new instance of the <see cref="Conn"/> class. /// </summary> public Conn(string addr, Config config, IConnDelegate connDelegate) { if (string.IsNullOrEmpty(addr)) { throw new ArgumentNullException("addr"); } if (config == null) { throw new ArgumentNullException("config"); } if (connDelegate == null) { throw new ArgumentNullException("connDelegate"); } _addr = addr; _config = config.Clone(); _delegate = connDelegate; _maxRdyCount = 2500; _lastMsgTimestamp = DateTime.Now.UnixNano(); _cmdChan = new Chan <Command>(); _msgResponseChan = new Chan <msgResponse>(); _exitChan = new Chan <int>(); _drainReady = new Chan <int>(); }
public MockProducerConn(IConnDelegate connDelegate) { _connDelegate = connDelegate; _closeCh = new Chan <bool>(); _pubCh = new Chan <bool>(); GoFunc.Run(router, "ProducerTest:router"); }
public MockProducerConn(IConnDelegate connDelegate) { _connDelegate = connDelegate; _closeCh = new Chan<bool>(); _pubCh = new Chan<bool>(); GoFunc.Run(router, "ProducerTest:router"); }
/// <summary> /// Initializes a new instance of the <see cref="Conn"/> class. /// </summary> public Conn(string addr, Config config, IConnDelegate connDelegate) { if (string.IsNullOrEmpty(addr)) throw new ArgumentNullException("addr"); if (config == null) throw new ArgumentNullException("config"); if (connDelegate == null) throw new ArgumentNullException("connDelegate"); _addr = addr; _config = config.Clone(); _delegate = connDelegate; _maxRdyCount = 2500; _lastMsgTimestamp = DateTime.Now.UnixNano(); _cmdChan = new Chan<Command>(); _msgResponseChan = new Chan<msgResponse>(); _exitChan = new Chan<int>(); _drainReady = new Chan<int>(); }