protected void ContinuePuzzleSolution(NetConnection conn) { var cParams = conn.GetConnectionParameters(); if (!ClientPuzzleManager.SolvePuzzle(ref cParams.PuzzleSolution, cParams.Nonce, cParams.ServerNonce, cParams.PuzzleDifficulty, cParams.ClientIdentity)) { return; } conn.ConnectionState = NetConnectionState.AwaitingConnectResponse; SendConnectRequest(conn); }
public NetInterface(int port) { Socket = new TNLSocket(port); NetClassRep.Initialize(); LastTimeoutCheckTime = 0; AllowConnections = true; RequiresKeyExchange = false; RandomHashData = new byte[12]; RandomUtil.Read(RandomHashData, 12); CurrentTime = Environment.TickCount; PuzzleManager = new ClientPuzzleManager(); }