mirror of https://github.com/vacp2p/nim-quic.git
Add Datagram.len
This commit is contained in:
parent
74dc38d01c
commit
cfa6df32c0
|
@ -5,3 +5,7 @@ type
|
|||
data*: seq[byte]
|
||||
ecn*: ECN
|
||||
DatagramBuffer* = openArray[byte]
|
||||
|
||||
|
||||
proc len*(datagram: Datagram): int =
|
||||
datagram.data.len
|
||||
|
|
|
@ -7,7 +7,7 @@ suite "udp":
|
|||
|
||||
test "writes packets to datagrams":
|
||||
let client = newClientConnection(zeroAddress, zeroAddress)
|
||||
check client.write().data.len > 0
|
||||
check client.write().len > 0
|
||||
|
||||
test "reads packets from datagram":
|
||||
let client = newClientConnection(zeroAddress, zeroAddress)
|
||||
|
|
Loading…
Reference in New Issue