mirror of https://github.com/vacp2p/nim-quic.git
Formatting
This commit is contained in:
parent
124ac8152f
commit
db54516c0f
|
@ -19,7 +19,8 @@ proc hasConnection(listener: Listener, id: ConnectionId): bool =
|
|||
proc getConnection(listener: Listener, id: ConnectionId): Connection =
|
||||
listener.connections[id]
|
||||
|
||||
proc addConnection(listener: Listener, connection: Connection, firstId: ConnectionId) {.async.} =
|
||||
proc addConnection(listener: Listener, connection: Connection,
|
||||
firstId: ConnectionId) {.async.} =
|
||||
connection.quic.onNewId = proc (newId: ConnectionId) =
|
||||
listener.connections[newId] = connection
|
||||
for id in connection.quic.ids & firstId:
|
||||
|
|
|
@ -20,7 +20,7 @@ suite "listener":
|
|||
check connection != nil
|
||||
done()
|
||||
|
||||
listener.udp = newDatagramTransport(onReceive, local=address)
|
||||
listener.udp = newDatagramTransport(onReceive, local = address)
|
||||
await exampleQuicDatagram().sendTo(address)
|
||||
|
||||
asynctest "re-uses connection for known connection id", done:
|
||||
|
@ -36,7 +36,7 @@ suite "listener":
|
|||
await connection.close()
|
||||
done()
|
||||
|
||||
listener.udp = newDatagramTransport(onReceive, local=address)
|
||||
listener.udp = newDatagramTransport(onReceive, local = address)
|
||||
let datagram = exampleQuicDatagram()
|
||||
await datagram.sendTo(address)
|
||||
await datagram.sendTo(address)
|
||||
|
@ -54,6 +54,6 @@ suite "listener":
|
|||
await connection.close()
|
||||
done()
|
||||
|
||||
listener.udp = newDatagramTransport(onReceive, local=address)
|
||||
listener.udp = newDatagramTransport(onReceive, local = address)
|
||||
await exampleQuicDatagram().sendTo(address)
|
||||
await exampleQuicDatagram().sendTo(address)
|
||||
|
|
Loading…
Reference in New Issue