move service to ntex-service

This commit is contained in:
Nikolay Kim 2020-02-26 10:45:29 -08:00
parent e8d60d728a
commit c910e595a2
66 changed files with 825 additions and 494 deletions

View file

@ -82,12 +82,10 @@ fn test_start() {
.backlog(100)
.disable_signals()
.bind("test", addr, move || {
fn_service(|io: TcpStream| {
async move {
let mut f = Framed::new(io, BytesCodec);
f.send(Bytes::from_static(b"test")).await.unwrap();
Ok::<_, ()>(())
}
fn_service(|io: TcpStream| async move {
let mut f = Framed::new(io, BytesCodec);
f.send(Bytes::from_static(b"test")).await.unwrap();
Ok::<_, ()>(())
})
})
.unwrap()