|
|
@ -379,46 +379,46 @@ fn main() { |
|
|
|
let patch_config = load_config();
|
|
|
|
let patch_motd = load_motd();
|
|
|
|
let (patch_file_tree, patch_file_lookup) = generate_patch_tree(patch_config.path.as_str());
|
|
|
|
let patch_state = PatchServerState::new(patch_file_tree, patch_file_lookup, patch_motd);
|
|
|
|
let patch_loop = patch_mainloop(patch_state, patch_config.port);
|
|
|
|
let patch_state = Box::new(PatchServerState::new(patch_file_tree, patch_file_lookup, patch_motd));
|
|
|
|
let patch_loop = patch_mainloop(*patch_state, patch_config.port);
|
|
|
|
|
|
|
|
let thread_entity_gateway = entity_gateway.clone();
|
|
|
|
info!("[auth] starting server");
|
|
|
|
let login_state = LoginServerState::new(thread_entity_gateway, "127.0.0.1".parse().unwrap());
|
|
|
|
let login_loop = login_mainloop(login_state, elseware::login::login::LOGIN_PORT);
|
|
|
|
let login_state = Box::new(LoginServerState::new(thread_entity_gateway, "127.0.0.1".parse().unwrap()));
|
|
|
|
let login_loop = login_mainloop(*login_state, elseware::login::login::LOGIN_PORT);
|
|
|
|
|
|
|
|
let thread_entity_gateway = entity_gateway.clone();
|
|
|
|
info!("[character] starting server");
|
|
|
|
let char_state = CharacterServerState::new(thread_entity_gateway, AuthToken("".into()));
|
|
|
|
let character_loop = character_mainloop(char_state, elseware::login::character::CHARACTER_PORT, elseware::login::login::COMMUNICATION_PORT);
|
|
|
|
let char_state = Box::new(CharacterServerState::new(thread_entity_gateway, AuthToken("".into())));
|
|
|
|
let character_loop = character_mainloop(*char_state, elseware::login::character::CHARACTER_PORT, elseware::login::login::COMMUNICATION_PORT);
|
|
|
|
|
|
|
|
let thread_entity_gateway = entity_gateway.clone();
|
|
|
|
info!("[ship] starting server");
|
|
|
|
let ship_state = ShipServerStateBuilder::new()
|
|
|
|
let ship_state = Box::new(ShipServerStateBuilder::new()
|
|
|
|
.name("US/Sona-Nyl".into())
|
|
|
|
.ip(Ipv4Addr::new(127,0,0,1))
|
|
|
|
.port(elseware::ship::ship::SHIP_PORT)
|
|
|
|
.gateway(thread_entity_gateway)
|
|
|
|
.build();
|
|
|
|
let ship_loop = ship_mainloop(ship_state, elseware::ship::ship::SHIP_PORT, std::net::Ipv4Addr::new(127, 0, 0, 1), elseware::login::login::COMMUNICATION_PORT);
|
|
|
|
.build());
|
|
|
|
let ship_loop = ship_mainloop(*ship_state, elseware::ship::ship::SHIP_PORT, std::net::Ipv4Addr::new(127, 0, 0, 1), elseware::login::login::COMMUNICATION_PORT);
|
|
|
|
|
|
|
|
let thread_entity_gateway = entity_gateway.clone();
|
|
|
|
let ship_state = ShipServerStateBuilder::new()
|
|
|
|
let ship_state = Box::new(ShipServerStateBuilder::new()
|
|
|
|
.name("EU/Dylath-Leen".into())
|
|
|
|
.ip(Ipv4Addr::new(127,0,0,1))
|
|
|
|
.port(elseware::ship::ship::SHIP_PORT+2000)
|
|
|
|
.gateway(thread_entity_gateway)
|
|
|
|
.build();
|
|
|
|
let ship_loop2 = ship_mainloop(ship_state, elseware::ship::ship::SHIP_PORT+2000, std::net::Ipv4Addr::new(127, 0, 0, 1), elseware::login::login::COMMUNICATION_PORT);
|
|
|
|
.build());
|
|
|
|
let ship_loop2 = ship_mainloop(*ship_state, elseware::ship::ship::SHIP_PORT+2000, std::net::Ipv4Addr::new(127, 0, 0, 1), elseware::login::login::COMMUNICATION_PORT);
|
|
|
|
|
|
|
|
let thread_entity_gateway = entity_gateway.clone();
|
|
|
|
let ship_state = ShipServerStateBuilder::new()
|
|
|
|
let ship_state = Box::new(ShipServerStateBuilder::new()
|
|
|
|
.name("JP/Thalarion".into())
|
|
|
|
.ip(Ipv4Addr::new(127,0,0,1))
|
|
|
|
.port(elseware::ship::ship::SHIP_PORT+3000)
|
|
|
|
.gateway(thread_entity_gateway)
|
|
|
|
.build();
|
|
|
|
let ship_loop3 = ship_mainloop(ship_state, elseware::ship::ship::SHIP_PORT+3000, std::net::Ipv4Addr::new(127, 0, 0, 1), elseware::login::login::COMMUNICATION_PORT);
|
|
|
|
.build());
|
|
|
|
let ship_loop3 = ship_mainloop(*ship_state, elseware::ship::ship::SHIP_PORT+3000, std::net::Ipv4Addr::new(127, 0, 0, 1), elseware::login::login::COMMUNICATION_PORT);
|
|
|
|
|
|
|
|
futures::future::join_all(vec![patch_loop, login_loop, character_loop, ship_loop, ship_loop2, ship_loop3]).await;
|
|
|
|
});
|
|
|
|