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); }
public async Task <bool> DeleteTickPipe() { if (_tickPipe == 0) { return(false); } bool isSuccess = await _sysPipe.DeletePipeAsync(_tickPipe); _tickPipeServer = null; return(isSuccess); }
public async Task <TickPipeServer> GetTickPipe() { if (_tickPipeServer != null) { return(_tickPipeServer); } _tickPipe = await _sysPipe.CreatePipeAsync(Encoding.UTF8.GetBytes("tick")); if (_tickPipe == 0) { return(null); } _tickPipeServer = new TickPipeServer(_core, _tickPipe); return(_tickPipeServer); }