static void Main(string[] args) { //Connect to database conn = DeltaConnection.InitDeltaManagedApp(args, DeltaCoreNetServerType.API_RPC, APP_VERSION_MAJOR, APP_VERSION_MINOR); conn.net.BindReceiveEvent(RouterConnection.OPCODE_SYS_RPC, OnIncomingRPCCommand); //Launch server MainAsync().GetAwaiter().GetResult(); }
static void Main(string[] args) { //Connect to database conn = DeltaConnection.InitDeltaManagedApp(args, DeltaCoreNetServerType.API_PRIMAL_PACKAGE_MANAGER, APP_VERSION_MAJOR, APP_VERSION_MINOR); //Start server DeltaWebServer server = new DeltaWebServer(conn, conn.GetUserPort(0)); server.AddService(new PackageQueryDefinition()); server.AddService(new PackageDWFDefinition()); server.AddService(new PackageJSONDefinition()); server.RunAsync().GetAwaiter().GetResult(); }
static void Main(string[] args) { //Connect to database conn = DeltaConnection.InitDeltaManagedApp(args, DeltaCoreNetServerType.API_ECHO, 0, 9); //Get structure metadata structureMetadata = conn.GetStructureMetadata().GetAwaiter().GetResult(); //Start server DeltaWebServer server = new DeltaWebServer(conn, conn.GetUserPort(0)); server.exposedHeaders.Add("X-Delta-Sync-TotalItems"); server.AddService(new StructureMetadataDefinition()); server.AddService(new V2DinoSyncDefinition()); server.AddService(new V2StructuresSyncDefinition()); server.AddService(new V2InventoriesSyncDefinition()); server.AddService(new WorldPlayerListDefinition()); server.RunAsync().GetAwaiter().GetResult(); }
static void Main(string[] args) { //Connect to database conn = DeltaConnection.InitDeltaManagedApp(args, DeltaCoreNetServerType.API_SYNC, VERSION_MAJOR, VERSION_MINOR); //Load client config clientConfig = new ModRemoteConfig(); // conn.GetUserConfig("sync_clientconfig.json", new ModRemoteConfig()).GetAwaiter().GetResult(); //Start server DeltaWebServer server = new DeltaWebServer(conn, conn.GetUserPort(0)); server.AddService(new ConfigRequestDefinition()); server.AddService(new RegisterRequestDefinition()); server.AddService(new PlayerProfilesRequestDefinition()); server.AddService(new CleanIdsDefinition()); server.AddService(new RpcAckDefinition()); server.AddService(new PingRequestDefinition()); server.AddService(new RealtimePlayersDefinition()); //server.AddService(new TestRequestDefinition()); //Run server.RunAsync().GetAwaiter().GetResult(); }