//
        public GameNetworkServer( string serverName, string serverVersion, int maxConnections,
            bool entitySystemServiceEnabled)
            : base(serverName, serverVersion, maxConnections)
        {
            if( instance != null )
                Log.Fatal( "GameNetworkServer.GameNetworkServer: instance != null." );
            instance = this;

            //register network services

            //register user management service
            userManagementService = new UserManagementServerNetworkService();
            RegisterService( userManagementService );

            //register custom messages service
            customMessagesService = new CustomMessagesServerNetworkService();
            RegisterService( customMessagesService );

            //register chat service
            chatService = new ChatServerNetworkService( userManagementService );
            RegisterService( chatService );

            //register entity system service
            if( entitySystemServiceEnabled )
            {
                entitySystemService = new EntitySystemServerNetworkService( userManagementService );
                RegisterService( entitySystemService );
            }
        }
Esempio n. 2
0
        //

        public GameNetworkServer(string serverName, string serverVersion, int maxConnections,
                                 bool entitySystemServiceEnabled)
            : base(serverName, serverVersion, maxConnections)
        {
            if (instance != null)
            {
                Log.Fatal("GameNetworkServer.GameNetworkServer: instance != null.");
            }
            instance = this;

            //register network services

            //register user management service
            userManagementService = new UserManagementServerNetworkService();
            RegisterService(userManagementService);

            //register custom messages service
            customMessagesService = new CustomMessagesServerNetworkService();
            RegisterService(customMessagesService);

            //register chat service
            chatService = new ChatServerNetworkService(userManagementService);
            RegisterService(chatService);

            //register entity system service
            if (entitySystemServiceEnabled)
            {
                entitySystemService = new EntitySystemServerNetworkService(userManagementService);
                RegisterService(entitySystemService);
            }
        }
                new List<NetworkNode.ConnectedNode>(); //for OnBeginEntitySystemMessage()

            #endregion Fields

            #region Constructors

            //
            public ServerEntitySystemNetworkingInterface( EntitySystemServerNetworkService service )
            {
                this.service = service;
            }
Esempio n. 4
0
                new List <NetworkNode.ConnectedNode>();               //for OnBeginEntitySystemMessage()

            //

            public ServerEntitySystemNetworkingInterface(EntitySystemServerNetworkService service)
            {
                this.service = service;
            }