mirror of https://github.com/vacp2p/nim-quic.git
Rename: sendLoop() -> networkLoop()
This commit is contained in:
parent
80a612ea11
commit
edaffcfcf6
|
@ -2,7 +2,7 @@ import chronos
|
||||||
import quic
|
import quic
|
||||||
import addresses
|
import addresses
|
||||||
|
|
||||||
proc sendLoop(source, destination: Connection) {.async.} =
|
proc networkLoop(source, destination: Connection) {.async.} =
|
||||||
while true:
|
while true:
|
||||||
let datagram = await source.outgoing.get()
|
let datagram = await source.outgoing.get()
|
||||||
destination.receive(datagram)
|
destination.receive(datagram)
|
||||||
|
@ -18,8 +18,8 @@ proc performHandshake*: Future[tuple[client, server: Connection]] {.async.} =
|
||||||
server.receive(datagram)
|
server.receive(datagram)
|
||||||
let serverHandshake = server.handshake()
|
let serverHandshake = server.handshake()
|
||||||
|
|
||||||
let clientLoop = sendLoop(client, server)
|
let clientLoop = networkLoop(client, server)
|
||||||
let serverLoop = sendLoop(server, client)
|
let serverLoop = networkLoop(server, client)
|
||||||
|
|
||||||
await allFutures(clientHandshake, serverHandshake)
|
await allFutures(clientHandshake, serverHandshake)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue