renamed serverActor to server
This commit is contained in:
parent
58df6bc7a8
commit
7e06d90d18
|
|
@ -8,12 +8,12 @@ pub(crate) mod client_management;
|
|||
pub(crate) mod network;
|
||||
pub(crate) mod prelude;
|
||||
|
||||
use server::ServerActor;
|
||||
use server::Server;
|
||||
use tokio::time::{sleep, Duration};
|
||||
|
||||
#[actix::main()]
|
||||
async fn main() {
|
||||
let _server = ServerActor::new();
|
||||
let _server = Server::new();
|
||||
loop {
|
||||
sleep(Duration::from_millis(1000)).await;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ use crate::{
|
|||
|
||||
/// This struct is the main actor of the server.
|
||||
/// all other actors are ran through here.
|
||||
pub struct ServerActor {
|
||||
pub struct Server {
|
||||
network_manager: Option<Addr<NetworkManager>>,
|
||||
client_management: Option<Addr<ClientManager>>,
|
||||
}
|
||||
|
||||
impl ServerActor {
|
||||
impl Server {
|
||||
pub(crate) fn new() -> Addr<Self> {
|
||||
ServerActor {
|
||||
Server {
|
||||
network_manager: None,
|
||||
client_management: None,
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ impl ServerActor {
|
|||
}
|
||||
}
|
||||
|
||||
impl Actor for ServerActor {
|
||||
impl Actor for Server {
|
||||
type Context = Context<Self>;
|
||||
|
||||
fn started(&mut self, ctx: &mut Self::Context) {
|
||||
|
|
@ -103,7 +103,7 @@ impl Actor for ServerActor {
|
|||
}
|
||||
}
|
||||
|
||||
impl Handler<NetworkOutput> for ServerActor {
|
||||
impl Handler<NetworkOutput> for Server {
|
||||
type Result = ();
|
||||
fn handle(
|
||||
&mut self,
|
||||
|
|
@ -125,7 +125,7 @@ impl Handler<NetworkOutput> for ServerActor {
|
|||
}
|
||||
}
|
||||
|
||||
impl Handler<ClientManagerOutput> for ServerActor {
|
||||
impl Handler<ClientManagerOutput> for Server {
|
||||
type Result = ();
|
||||
|
||||
fn handle(
|
||||
|
|
|
|||
Loading…
Reference in New Issue