Exemplo n.º 1
0
        public HubNetworkClient(string name, string network, IPEndPoint ep, ClientSocketOptions opts, Logger logger = null)
        {
            Name = name;

            _logger = logger ?? LogManager.GetLogger("HubNetwork.Client");
            _client = new InternalHubNetworkClient(name, network, ep, opts, _logger);
            _opts   = opts;

            _client.OnConnected    += () => OnConnected?.Invoke();
            _client.OnDisconnected += () => OnDisconnected?.Invoke();
            _client.OnMessage      += (s, m) => OnInternalMessage(m);
        }
Exemplo n.º 2
0
 public HubNetworkClient(string name, IPEndPoint ep, ClientSocketOptions opts, Logger logger = null)
     : this(name, "", ep, opts, logger)
 {
 }