mirror of
https://github.com/vacp2p/nim-libp2p-experimental.git
synced 2025-01-27 10:35:10 +00:00
fix tests
This commit is contained in:
parent
8a52cfa9b0
commit
573a568946
@ -9,7 +9,6 @@ suite "TCP transport suite":
|
|||||||
let ma: MultiAddress = Multiaddress.init("/ip4/127.0.0.1/tcp/53335")
|
let ma: MultiAddress = Multiaddress.init("/ip4/127.0.0.1/tcp/53335")
|
||||||
proc connHandler(conn: Connection): Future[void] {.async ,gcsafe.} =
|
proc connHandler(conn: Connection): Future[void] {.async ,gcsafe.} =
|
||||||
result = conn.write(cstring("Hello!"), 6)
|
result = conn.write(cstring("Hello!"), 6)
|
||||||
await conn.close()
|
|
||||||
|
|
||||||
let transport: TcpTransport = newTransport(TcpTransport)
|
let transport: TcpTransport = newTransport(TcpTransport)
|
||||||
await transport.listen(ma, connHandler)
|
await transport.listen(ma, connHandler)
|
||||||
@ -97,7 +96,6 @@ suite "TCP transport suite":
|
|||||||
let ma: MultiAddress = Multiaddress.init("/ip4/127.0.0.1/tcp/53339")
|
let ma: MultiAddress = Multiaddress.init("/ip4/127.0.0.1/tcp/53339")
|
||||||
proc connHandler(conn: Connection): Future[void] {.async ,gcsafe.} =
|
proc connHandler(conn: Connection): Future[void] {.async ,gcsafe.} =
|
||||||
result = conn.write(cstring("Hello!"), 6)
|
result = conn.write(cstring("Hello!"), 6)
|
||||||
await conn.close()
|
|
||||||
|
|
||||||
let transport1: TcpTransport = newTransport(TcpTransport)
|
let transport1: TcpTransport = newTransport(TcpTransport)
|
||||||
await transport1.listen(ma, connHandler)
|
await transport1.listen(ma, connHandler)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user