예제 #1
0
파일: LeechServer.cs 프로젝트: vlshl/pulxer
 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);
 }
예제 #2
0
        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);
        }