public NetworkSession(Session session, ConnectionListener connectionListener, ushort clientId, ushort serverId) { this.session = session; this.connectionListener = connectionListener; ClientId = clientId; ServerId = serverId; // New network auth session timeouts will always be low. TimeoutTick = DateTime.UtcNow.AddSeconds(AuthenticationHandler.DefaultAuthTimeout).Ticks; for (int i = 0; i < currentBundles.Length; i++) { currentBundleLocks[i] = new object(); currentBundles[i] = new NetworkBundle(); } }
public NetworkSession(Session session, ConnectionListener connectionListener, ushort clientId, ushort serverId) { this.session = session; this.connectionListener = connectionListener; ClientId = clientId; ServerId = serverId; // New network auth session timeouts will always be low. TimeoutTick = DateTime.UtcNow.AddSeconds(AuthenticationHandler.DefaultAuthTimeout).Ticks; for (int i = 0; i < currentBundles.Length; i++) { currentBundleLocks[i] = new object(); currentBundles[i] = new NetworkBundle(); } ConnectionData.CryptoClient.OnCryptoSystemCatastrophicFailure += (sender, e) => { session.Terminate(SessionTerminationReason.ClientConnectionFailure); }; }
public Session(ConnectionListener connectionListener, IPEndPoint endPoint, ushort clientId, ushort serverId) { EndPoint = endPoint; Network = new NetworkSession(this, connectionListener, clientId, serverId); }