MCPcopy Create free account
hub / github.com/ImplFerris/esp32-projects / web_task

Function web_task

wifi-ap/src/web.rs:22–37  ·  view source on GitHub ↗
(
    task_id: usize,
    stack: Stack<'static>,
    router: &'static AppRouter<Application>,
    config: &'static picoserve::Config<Duration>,
)

Source from the content-addressed store, hash-verified

20
21#[embassy_executor::task(pool_size = WEB_TASK_POOL_SIZE)]
22pub async fn web_task(
23 task_id: usize,
24 stack: Stack<'static>,
25 router: &'static AppRouter<Application>,
26 config: &'static picoserve::Config<Duration>,
27) -> ! {
28 let port = 80;
29 let mut tcp_rx_buffer = [0; 1024];
30 let mut tcp_tx_buffer = [0; 1024];
31 let mut http_buffer = [0; 2048];
32
33 picoserve::Server::new(router, config, &mut http_buffer)
34 .listen_and_serve(task_id, stack, port, &mut tcp_rx_buffer, &mut tcp_tx_buffer)
35 .await
36 .into_never()
37}
38
39pub struct WebApp {
40 pub router: &'static Router<<Application as AppBuilder>::PathRouter>,

Callers 1

mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected