🚧 Can I test these within the same process?
parent
07686e693c
commit
8d3fc71dcf
|
@ -244,8 +244,7 @@ async fn handle_all (req: Request <Body>, state: Arc <ServerState>)
|
|||
}
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main () -> Result <(), Box <dyn Error>> {
|
||||
async fn relay_main () -> Result <(), Box <dyn Error>> {
|
||||
let addr = SocketAddr::from(([0, 0, 0, 0], 4000));
|
||||
|
||||
let state = Arc::new (ServerState::default ());
|
||||
|
@ -268,3 +267,8 @@ async fn main () -> Result <(), Box <dyn Error>> {
|
|||
|
||||
Ok (())
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main () -> Result <(), Box <dyn Error>> {
|
||||
relay_main ().await
|
||||
}
|
||||
|
|
|
@ -55,8 +55,7 @@ async fn handle_req_resp (
|
|||
Ok (())
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main () -> Result <(), Box <dyn Error>> {
|
||||
async fn server_main () -> Result <(), Box <dyn Error>> {
|
||||
let client = Arc::new (Client::new ());
|
||||
|
||||
let mut backoff_delay = 0;
|
||||
|
@ -91,3 +90,8 @@ async fn main () -> Result <(), Box <dyn Error>> {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main () -> Result <(), Box <dyn Error>> {
|
||||
server_main ().await
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue