Nyan.Modules.Log.ZeroMQ.Channel.Channel C# (CSharp) Method

Channel() public method

public Channel ( string topic = "", bool canSend = true, bool canReceive = false, string address = null ) : System
topic string
canSend bool
canReceive bool
address string
return Nyan.Core.Modules.Log.System
        public Channel(string topic = "", bool canSend = true, bool canReceive = false, string address = null)
        {
            _topic = topic;
            _canSend = canSend;
            _canReceive = canReceive;
            _address = address;

            var uri = new Uri(_address);

            Protocol = uri.Scheme;
            Uri = _address;

            if (!(_canSend || _canReceive))
                throw new InvalidOperationException("Channel was told not to Send or Receive.");

            if (_canSend)
                StartSender();

            if (!_canReceive) return;

            MonitorMessages();
        }