mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
http: move network.rs and handlers.rs to new workers dir, rename
This commit is contained in:
parent
4071d4d874
commit
1e77745a84
4 changed files with 6 additions and 7 deletions
|
|
@ -15,9 +15,8 @@ use std::{
|
|||
use crate::config::Config;
|
||||
|
||||
mod common;
|
||||
mod workers;
|
||||
pub mod config;
|
||||
mod handlers;
|
||||
mod network;
|
||||
|
||||
pub const APP_NAME: &str = "aquatic_http: HTTP/TLS BitTorrent tracker";
|
||||
|
||||
|
|
@ -86,7 +85,7 @@ pub fn run_inner(config: Config, state: State) -> anyhow::Result<()> {
|
|||
WorkerIndex::SocketWorker(i),
|
||||
);
|
||||
|
||||
network::run_socket_worker(
|
||||
workers::socket::run_socket_worker(
|
||||
config,
|
||||
state,
|
||||
tls_config,
|
||||
|
|
@ -116,7 +115,7 @@ pub fn run_inner(config: Config, state: State) -> anyhow::Result<()> {
|
|||
WorkerIndex::RequestWorker(i),
|
||||
);
|
||||
|
||||
handlers::run_request_worker(config, state, request_mesh_builder, response_mesh_builder)
|
||||
workers::request::run_request_worker(config, state, request_mesh_builder, response_mesh_builder)
|
||||
.await
|
||||
});
|
||||
|
||||
|
|
|
|||
2
aquatic_http/src/workers/mod.rs
Normal file
2
aquatic_http/src/workers/mod.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
pub mod request;
|
||||
pub mod socket;
|
||||
|
|
@ -24,11 +24,9 @@ use glommio::timer::TimerActionRepeat;
|
|||
use glommio::{enclose, prelude::*};
|
||||
use slab::Slab;
|
||||
|
||||
use crate::common::num_digits_in_usize;
|
||||
use crate::common::*;
|
||||
use crate::config::Config;
|
||||
|
||||
use super::common::*;
|
||||
|
||||
const INTERMEDIATE_BUFFER_SIZE: usize = 1024;
|
||||
const MAX_REQUEST_SIZE: usize = 2048;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue