@@ -2,7 +2,9 @@ use core::fmt::{self, Debug, Display};
2
2
use core:: mem:: { self , MaybeUninit } ;
3
3
use core:: pin:: pin;
4
4
5
- use edge_nal:: { with_timeout, Close , Readable , TcpShutdown , WithTimeout , WithTimeoutError } ;
5
+ use edge_nal:: {
6
+ with_timeout, Close , Readable , TcpShutdown , TcpSplit , WithTimeout , WithTimeoutError ,
7
+ } ;
6
8
7
9
use embassy_sync:: blocking_mutex:: raw:: NoopRawMutex ;
8
10
use embassy_sync:: mutex:: Mutex ;
@@ -361,7 +363,7 @@ pub trait Handler {
361
363
connection : & mut Connection < ' _ , T , N > ,
362
364
) -> Result < ( ) , Self :: Error < T :: Error > >
363
365
where
364
- T : Read + Write ;
366
+ T : Read + Write + TcpSplit ;
365
367
}
366
368
367
369
impl < H > Handler for & H
@@ -379,7 +381,7 @@ where
379
381
connection : & mut Connection < ' _ , T , N > ,
380
382
) -> Result < ( ) , Self :: Error < T :: Error > >
381
383
where
382
- T : Read + Write ,
384
+ T : Read + Write + TcpSplit ,
383
385
{
384
386
( * * self ) . handle ( task_id, connection) . await
385
387
}
@@ -400,7 +402,7 @@ where
400
402
connection : & mut Connection < ' _ , T , N > ,
401
403
) -> Result < ( ) , Self :: Error < T :: Error > >
402
404
where
403
- T : Read + Write ,
405
+ T : Read + Write + TcpSplit ,
404
406
{
405
407
( * * self ) . handle ( task_id, connection) . await
406
408
}
@@ -421,7 +423,7 @@ where
421
423
connection : & mut Connection < ' _ , T , N > ,
422
424
) -> Result < ( ) , Self :: Error < T :: Error > >
423
425
where
424
- T : Read + Write ,
426
+ T : Read + Write + TcpSplit ,
425
427
{
426
428
let mut io = pin ! ( self . io( ) . handle( task_id, connection) ) ;
427
429
@@ -463,7 +465,7 @@ pub async fn handle_connection<H, T, const N: usize>(
463
465
handler : H ,
464
466
) where
465
467
H : Handler ,
466
- T : Read + Write + Readable + TcpShutdown ,
468
+ T : Read + Write + Readable + TcpSplit + TcpShutdown ,
467
469
{
468
470
let close = loop {
469
471
debug ! ( "Handler task {task_id}: Waiting for a new request" ) ;
@@ -584,7 +586,7 @@ pub async fn handle_request<H, T, const N: usize>(
584
586
) -> Result < bool , HandlerError < T :: Error , H :: Error < T :: Error > > >
585
587
where
586
588
H : Handler ,
587
- T : Read + Write ,
589
+ T : Read + Write + TcpSplit ,
588
590
{
589
591
let mut connection = Connection :: < _ , N > :: new ( buf, io) . await ?;
590
592
0 commit comments