1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 17:07:01 +02:00

refactor server service configuration protcess

This commit is contained in:
Nikolay Kim
2018-11-03 09:09:14 -07:00
parent 0e3d1068da
commit 1ac018dc79
5 changed files with 349 additions and 64 deletions

View File

@@ -3,10 +3,12 @@
use actix::Message;
mod accept;
mod config;
mod server;
mod services;
mod worker;
pub use self::config::{ServiceConfig, ServiceRuntime};
pub use self::server::Server;
pub use self::services::{ServerMessage, ServiceFactory, StreamServiceFactory};
@@ -34,5 +36,11 @@ impl Message for StopServer {
}
/// Socket id token
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub(crate) struct Token(usize);
impl Token {
pub(crate) fn next(&self) -> Token {
Token(self.0 + 1)
}
}