|
@ -2,8 +2,8 @@ use std::net::Ipv4Addr; |
|
|
use log::{info};
|
|
|
use log::{info};
|
|
|
|
|
|
|
|
|
use networking::interserver::AuthToken;
|
|
|
use networking::interserver::AuthToken;
|
|
|
use elseware::login::login::LoginServerState;
|
|
|
|
|
|
use elseware::login::character::CharacterServerState;
|
|
|
|
|
|
|
|
|
use login_server::login::LoginServerState;
|
|
|
|
|
|
use login_server::character::CharacterServerState;
|
|
|
use patch_server::{PatchServerState, generate_patch_tree, load_config, load_motd};
|
|
|
use patch_server::{PatchServerState, generate_patch_tree, load_config, load_motd};
|
|
|
use elseware::ship::ship::ShipServerStateBuilder;
|
|
|
use elseware::ship::ship::ShipServerStateBuilder;
|
|
|
|
|
|
|
|
@ -344,19 +344,19 @@ fn main() { |
|
|
info!("[auth] starting server");
|
|
|
info!("[auth] starting server");
|
|
|
let login_state = LoginServerState::new(entity_gateway.clone(), "127.0.0.1".parse().unwrap());
|
|
|
let login_state = LoginServerState::new(entity_gateway.clone(), "127.0.0.1".parse().unwrap());
|
|
|
let login_loop = async_std::task::spawn(async move {
|
|
|
let login_loop = async_std::task::spawn(async move {
|
|
|
networking::mainloop::run_server(login_state, elseware::login::login::LOGIN_PORT).await;
|
|
|
|
|
|
|
|
|
networking::mainloop::run_server(login_state, login_server::login::LOGIN_PORT).await;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
info!("[character] starting server");
|
|
|
info!("[character] starting server");
|
|
|
let char_state = CharacterServerState::new(entity_gateway.clone(), AuthToken("".into()));
|
|
|
let char_state = CharacterServerState::new(entity_gateway.clone(), AuthToken("".into()));
|
|
|
let sub_char_state = char_state.clone();
|
|
|
let sub_char_state = char_state.clone();
|
|
|
let character_loop = async_std::task::spawn(async move {
|
|
|
let character_loop = async_std::task::spawn(async move {
|
|
|
networking::mainloop::run_server(sub_char_state, elseware::login::character::CHARACTER_PORT).await;
|
|
|
|
|
|
|
|
|
networking::mainloop::run_server(sub_char_state, login_server::character::CHARACTER_PORT).await;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
let sub_char_state = char_state.clone();
|
|
|
let sub_char_state = char_state.clone();
|
|
|
let inter_character_loop = async_std::task::spawn(async move {
|
|
|
let inter_character_loop = async_std::task::spawn(async move {
|
|
|
networking::mainloop::run_interserver_listen(sub_char_state, elseware::login::login::COMMUNICATION_PORT).await;
|
|
|
|
|
|
|
|
|
networking::mainloop::run_interserver_listen(sub_char_state, login_server::login::COMMUNICATION_PORT).await;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
info!("[ship] starting servers");
|
|
|
info!("[ship] starting servers");
|
|
@ -373,7 +373,7 @@ fn main() { |
|
|
});
|
|
|
});
|
|
|
let sub_ship_state = ship_state.clone();
|
|
|
let sub_ship_state = ship_state.clone();
|
|
|
let inter_ship_loop1 = async_std::task::spawn(async move {
|
|
|
let inter_ship_loop1 = async_std::task::spawn(async move {
|
|
|
networking::mainloop::run_interserver_connect(sub_ship_state, std::net::Ipv4Addr::new(127, 0, 0, 1), elseware::login::login::COMMUNICATION_PORT).await;
|
|
|
|
|
|
|
|
|
networking::mainloop::run_interserver_connect(sub_ship_state, std::net::Ipv4Addr::new(127, 0, 0, 1), login_server::login::COMMUNICATION_PORT).await;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
let ship_state = ShipServerStateBuilder::default()
|
|
|
let ship_state = ShipServerStateBuilder::default()
|
|
@ -389,7 +389,7 @@ fn main() { |
|
|
});
|
|
|
});
|
|
|
let sub_ship_state = ship_state.clone();
|
|
|
let sub_ship_state = ship_state.clone();
|
|
|
let inter_ship_loop2 = async_std::task::spawn(async move {
|
|
|
let inter_ship_loop2 = async_std::task::spawn(async move {
|
|
|
networking::mainloop::run_interserver_connect(sub_ship_state, std::net::Ipv4Addr::new(127, 0, 0, 1), elseware::login::login::COMMUNICATION_PORT).await;
|
|
|
|
|
|
|
|
|
networking::mainloop::run_interserver_connect(sub_ship_state, std::net::Ipv4Addr::new(127, 0, 0, 1), login_server::login::COMMUNICATION_PORT).await;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
let ship_state = ShipServerStateBuilder::default()
|
|
|
let ship_state = ShipServerStateBuilder::default()
|
|
@ -404,7 +404,7 @@ fn main() { |
|
|
});
|
|
|
});
|
|
|
let sub_ship_state = ship_state.clone();
|
|
|
let sub_ship_state = ship_state.clone();
|
|
|
let inter_ship_loop3 = async_std::task::spawn(async move {
|
|
|
let inter_ship_loop3 = async_std::task::spawn(async move {
|
|
|
networking::mainloop::run_interserver_connect(sub_ship_state, std::net::Ipv4Addr::new(127, 0, 0, 1), elseware::login::login::COMMUNICATION_PORT).await;
|
|
|
|
|
|
|
|
|
networking::mainloop::run_interserver_connect(sub_ship_state, std::net::Ipv4Addr::new(127, 0, 0, 1), login_server::login::COMMUNICATION_PORT).await;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
futures::future::join_all(vec![patch_loop, login_loop, character_loop, inter_character_loop,
|
|
|
futures::future::join_all(vec![patch_loop, login_loop, character_loop, inter_character_loop,
|
|
|