internal AsyncPeer(IApi api) { _waitingCommands = new Dictionary <string, List <WaitingCommandContainer> >(); _packers = new Dictionary <string, Packer>(); _syncContext = new EngineSyncContext(); _requestQueue = new RequestQueue(api); _diffieHellman = new ECDiffieHellmanCng(KeySize); _diffieHellman.KeyDerivationFunction = ECDiffieHellmanKeyDerivationFunction.Hash; _diffieHellman.HashAlgorithm = CngAlgorithm.Sha256; }
internal AsyncPeer(UserId id, X509Certificate2 certificate, IApi api, IClientNotifier notifier, Logger logger) { _id = id; _localCertificate = certificate; _peers = new Dictionary <UserId, RemotePeer>(); _syncContext = new EngineSyncContext(); _requestQueue = new RequestQueue(api); _api = api; _notifier = notifier; _logger = logger; }
public AsyncServer(IApi api, IServerNotifier notifier, Logger logger) { _connections = new Dictionary <string, ServerConnection>(); _api = api; _requestQueue = new RequestQueue(api); _requestQueue.Error += OnRequestQueueError; _notifier = notifier; _isServerRunning = false; _logger = logger; }
public AsyncServer(X509Certificate2 certificate, IApi api, IServerNotifier notifier, Logger logger) { _connections = new Dictionary <UserId, ServerConnection>(); _certificate = certificate; _api = api; _requestQueue = new RequestQueue(api); _requestQueue.Error += OnRequestQueueError; _notifier = notifier; _bans = new ServerBans(this); _isServerRunning = false; _logger = logger; }
public AsyncClient(UserId id, CertificatesStorage trustedCertificates, X509Certificate2 certificate, IApi api, IClientNotifier notifier, Logger logger) : base(trustedCertificates, certificate, logger) { Id = id; _api = api; _requestQueue = new RequestQueue(api); _requestQueue.Error += OnRequestQueueError; _notifier = notifier; _reconnect = true; _reconnecting = false; _logger = logger; }
public AsyncClient(string id, IApi api, IClientNotifier notifier, Logger logger) { Id = id; _api = api; _requestQueue = new RequestQueue(api); _requestQueue.Error += OnRequestQueueError; _notifier = notifier; _timer = new Timer(OnTimer, null, SystemTimerInterval, -1); _reconnect = true; _reconnecting = false; _logger = logger; }
public QueueContainer(RequestQueue queue) { _queue = queue; }
public QueueContainer(RequestQueue <TArgs> queue) { this.queue = queue; }