Browse Source

start character server

pbs
Jake Probst 5 years ago
parent
commit
df3d031612
  1. 2
      src/login/character.rs
  2. 13
      src/login/main.rs

2
src/login/character.rs

@ -78,7 +78,7 @@ pub struct CharacterServerState<DA: DataAccess> {
}
impl<DA: DataAccess> CharacterServerState<DA> {
fn new(data_access: DA) -> CharacterServerState<DA> {
pub fn new(data_access: DA) -> CharacterServerState<DA> {
CharacterServerState {
//shared_state: shared_state,
data_access: data_access,

13
src/login/main.rs

@ -95,6 +95,15 @@ fn main() {
println!("[login+character] starting server");
// TODO: character mainloop
let auth_state = LoginServerState::new(LoginStubData {});
elseware::common::mainloop::mainloop(auth_state, login::LOGIN_PORT);
let auth_thread = thread::spawn(|| {
let auth_state = LoginServerState::new(LoginStubData {});
elseware::common::mainloop::mainloop(auth_state, login::LOGIN_PORT);
});
let char_thread = thread::spawn(|| {
let char_state = CharacterServerState::new(LoginStubData {});
elseware::common::mainloop::mainloop(char_state, character::CHARACTER_PORT);
});
auth_thread.join();
char_thread.join();
}
Loading…
Cancel
Save