public TCPListener(int port, IListenerHandler owner) { mOwner = owner; mListenIPaddr = "0.0.0.0"; //IPAddress hostIP = (Dns.Resolve(IPAddress.Any.ToString())).AddressList[0]; mListenPort = port; }
public EventListener(ILoggerFactory loggerFactory, IRabbitMqReadClient rabbitMQReadClient, IOptions <RabbitMqSettings> settings, IListenerHandler listenerHandler) { _logger = loggerFactory.CreateLogger <EventListener>(); _rabbitMQReadClient = rabbitMQReadClient; _listenerHandler = listenerHandler; _settings = settings.Value; }
/// <summary> /// initialize listen /// </summary> /// <param name="host"></param> /// <param name="port"></param> private void Initialize(IPAddress host, int port) { if (port < 1 || port > 65535) { throw new ArgumentOutOfRangeException("port", "listen port allow 1-65535."); } this.host = host; this.port = port; // this.logAgent = new LogAgent(); this.handler = ListenerHandler.Default; }
public IListener ListenFor(IListenerHandler handler) { var listener = new Listener(this, handler); lock (_lock) { _listeners.Add(listener); } _hubClientTransport.ListenFor(Id, handler.TypeId); return(listener); }
internal Listener(IListenerHandler owner, AdapterProperties channel) { if (channel == null) { throw new ArgumentNullException("channel"); } if (channel.Source == null) { throw new ArgumentNullException("channel.Source"); } _Owner = owner; _Source = channel.Source; _TransferTo = channel.TransferTo; //_ServerName = channel.ServerName; //_QueueName = channel.Source; _Interval = channel.Interval; _ConnectTimeout = channel.ConnectTimeout; _WorkerCount = channel.WorkerCount; _Action = channel.TargetAction; _AdapterOperation = channel.OperationType; }
public AsyncHttpListener(IListenerHandler handler) { this.handler = handler; this.semaphore = new SemaphoreSlim(Environment.ProcessorCount * 2, Environment.ProcessorCount * 2); }
public Listener(HubClient hubClient, IListenerHandler handler) { _hubClient = hubClient; _handler = handler; }
public TCPListener(string listenIp, int listenPort, IListenerHandler owner) { mOwner = owner; mListenIPaddr = listenIp; mListenPort = listenPort; }
internal ListenerQ(IListenerHandler owner, AdapterProperties properties) : base(owner, properties) { _Adapter = properties.GetAdapter(); _Adapter.ConnectTimeout = properties.ConnectTimeout; }