use init instead of toMultiAddr
This commit is contained in:
parent
0b77c8c6e3
commit
7b66198566
|
@ -56,7 +56,7 @@ suite "TCP transport":
|
||||||
var server = createStreamServer(address, serveClient, {ReuseAddr})
|
var server = createStreamServer(address, serveClient, {ReuseAddr})
|
||||||
server.start()
|
server.start()
|
||||||
|
|
||||||
let ma: MultiAddress = server.sock.getLocalAddress().toMultiAddr()
|
let ma: MultiAddress = MultiAddress.init(server.sock.getLocalAddress())
|
||||||
let transport: TcpTransport = newTransport(TcpTransport)
|
let transport: TcpTransport = newTransport(TcpTransport)
|
||||||
let conn = await transport.dial(ma)
|
let conn = await transport.dial(ma)
|
||||||
let msg = await conn.read(6)
|
let msg = await conn.read(6)
|
||||||
|
@ -83,7 +83,7 @@ suite "TCP transport":
|
||||||
var server = createStreamServer(address, serveClient, {ReuseAddr})
|
var server = createStreamServer(address, serveClient, {ReuseAddr})
|
||||||
server.start()
|
server.start()
|
||||||
|
|
||||||
let ma: MultiAddress = server.sock.getLocalAddress().toMultiAddr()
|
let ma: MultiAddress = MultiAddress.init(server.sock.getLocalAddress())
|
||||||
let transport: TcpTransport = newTransport(TcpTransport)
|
let transport: TcpTransport = newTransport(TcpTransport)
|
||||||
let conn = await transport.dial(ma)
|
let conn = await transport.dial(ma)
|
||||||
await conn.write(cstring("Hello!"), 6)
|
await conn.write(cstring("Hello!"), 6)
|
||||||
|
|
Loading…
Reference in New Issue