use embassy_net::IpEndpoint;
use crate::channel::WriteChannel;
use crate::err::SocketErr;
pub trait TcpServerCallBack {
type T;
async fn conn<const CN: usize>(&self, endpoint: IpEndpoint, wch: &WriteChannel<'_, CN>, t: &mut Self::T);
async fn dis_conn(&self, endpoint: IpEndpoint, t: &mut Self::T);
async fn recv<const CN: usize>(&self, endpoint: IpEndpoint, buf: &[u8], wch: &WriteChannel<'_, CN>, t: &mut Self::T);
async fn err(&self, err: SocketErr, t: &mut Self::T);
}