start character server

This commit is contained in:
Jake Probst 2019-09-06 17:02:14 -07:00
parent e97ae1ffb5
commit df3d031612
2 changed files with 12 additions and 3 deletions

View File

@ -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,

View File

@ -95,6 +95,15 @@ fn main() {
println!("[login+character] starting server");
// TODO: character mainloop
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();
}