Exemplo n.º 1
0
        public SnowflakeClient(IEnumerable <string> endpoints)
        {
            #if DEBUG
            _socket = new AsyncBinarySocketClient(8192, 8192, 30000, 30000);
            #else
            _socket = new AsyncBinarySocketClient(8192, 8192, 3000, 3000);
            #endif
            _nodes = new List <string>();

            foreach (var endpoint in endpoints)
            {
                AddNode(endpoint);
            }
        }
Exemplo n.º 2
0
 public ProducerManager(ProducerSetting producerSetting)
 {
     _producerSetting = producerSetting;
     _client          = new AsyncBinarySocketClient(8192, 8192, _producerSetting.Timeout, _producerSetting.Timeout);
     _client.RegisterServerNode(_producerSetting.BrokerName, new IPEndPoint(IPAddress.Parse(_producerSetting.BrokerAddress), _producerSetting.BrokerPort));
 }