public VMServerDriver(int port, VMServerClosedHandler onShutdown) { listener = new Listener(EncryptionMode.NoEncryption); listener.Initialize(new IPEndPoint(IPAddress.Any, port)); listener.OnConnected += SendLotState; listener.OnDisconnected += LotDC; GlobalLink = new VMTSOGlobalLinkStub(); //final server will use DB hooked class ClientsToDC = new HashSet<NetworkClient>(); ClientsToSync = new HashSet<NetworkClient>(); QueuedCmds = new List<VMNetCommand>(); TickBuffer = new List<VMNetTick>(); ClientToUID = new Dictionary<NetworkClient, uint>(); UIDtoClient = new Dictionary<uint, NetworkClient>(); if (onShutdown != null) OnShutdown += onShutdown; SandboxBans = new BanList(); }
public VMServerDriver(int port, VMServerClosedHandler onShutdown) { listener = new Listener(EncryptionMode.NoEncryption); listener.Initialize(new IPEndPoint(IPAddress.Any, port)); listener.OnConnected += SendLotState; listener.OnDisconnected += LotDC; GlobalLink = new VMTSOGlobalLinkStub(); //final server will use DB hooked class ClientsToDC = new HashSet <NetworkClient>(); ClientsToSync = new HashSet <NetworkClient>(); QueuedCmds = new List <VMNetCommand>(); TickBuffer = new List <VMNetTick>(); ClientToUID = new Dictionary <NetworkClient, uint>(); UIDtoClient = new Dictionary <uint, NetworkClient>(); if (onShutdown != null) { OnShutdown += onShutdown; } SandboxBans = new BanList(); }