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

Function web_task

wifi-led/src/web.rs:27–42  ·  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

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

Callers 1

mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected