public LeechServer(LeechPipeServerSocket socket) { _tickPipeServer = null; _core = new LpCore(socket, true); // сервер _pipeFactory = new LeechServerPipeFactory(_core); _sysPipe = new SystemLp(_pipeFactory, _core); _core.Initialize(_sysPipe, "Pulxer", false); }
private async Task <bool> ConnectAsync() { string url; string login; string password; _dataProtect.GetPulxerParams(out url, out login, out password); var res = await _socket.ConnectAsync(url, login, password); if (!res.IsSuccess) { _logger.AddError("LpClientApp", "Pulxer connection error: " + res.Message); return(false); } _core.Initialize(_sysPipe, "Leech Agent"); _logger.AddInfo("LpClientApp", "Pulxer connection successful."); return(true); }