mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-03 22:13:06 +00:00
add 50ms simulated network latency
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
23733c13c8
commit
ba0d671e51
@ -48,6 +48,7 @@ when(true): #enable network emulator
|
||||
proc sendTo*[T](transp: DatagramTransport, remote: TransportAddress,
|
||||
msg: sink seq[T], msglen = -1) {.async.} =
|
||||
#echo "sending to ", remote
|
||||
await sleepAsync(50.milliseconds)
|
||||
{.gcsafe.}:
|
||||
network[remote.port].recvFrom(transp.local, msg)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user