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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user