public LoginClient(TcpClient tcpClient) { Client = tcpClient; NetStream = tcpClient.GetStream(); Address = tcpClient.Client.RemoteEndPoint; Key = new SessionKey(); State = LoginClientState.Connected; ConnectionStartTime = DateTime.Now; UsesInternalIP = Address.IsLocalIpAddress(); InitializeNetwork(); }
public LoginClient(TcpClient tcpClient, Managers.ClientManager clientManager, PacketHandler packetHandler) { _tcpClient = tcpClient; ClientManager = clientManager; _packetHandler = packetHandler; _networkStream = tcpClient.GetStream(); Address = tcpClient.Client.RemoteEndPoint; SessionId = RandomThreadSafe.Instance.Next(); Key = new SessionKey(RandomThreadSafe.Instance.Next(), RandomThreadSafe.Instance.Next(), RandomThreadSafe.Instance.Next(), RandomThreadSafe.Instance.Next()); State = LoginClientState.Connected; InitializeNetwork(); }
public LoginClient(TcpClient tcpClient, Managers.ClientManager clientManager, PacketHandler packetHandler) { Client = tcpClient; _clientManager = clientManager; _packetHandler = packetHandler; NetStream = tcpClient.GetStream(); Address = tcpClient.Client.RemoteEndPoint; Random rnd = new Random(); SessionId = rnd.Next(); Key = new SessionKey(rnd.Next(), rnd.Next(), rnd.Next(), rnd.Next()); State = LoginClientState.Connected; InitializeNetwork(); }
public LoginClient(TcpClient tcpClient, Managers.ClientManager clientManager, PacketHandler packetHandler) { Client = tcpClient; _clientManager = clientManager; _packetHandler = packetHandler; NetStream = tcpClient.GetStream(); Address = tcpClient.Client.RemoteEndPoint; Random rnd = new Random(); SessionId = rnd.Next(); Key = new SessionKey(rnd.Next(), rnd.Next(), rnd.Next(), rnd.Next()); State = LoginClientState.Connected; ConnectionStartTime = DateTime.Now; UsesInternalIP = Address.IsLocalIpAddress(); InitializeNetwork(); }