コード例 #1
0
ファイル: VMServerDriver.cs プロジェクト: RHY3756547/FreeSO
        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();
        }
コード例 #2
0
        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();
        }