mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
fix: DatagramConn.send should return bytes sent (#6265)
This commit is contained in:
parent
f6fa659384
commit
77545219a6
5 changed files with 20 additions and 15 deletions
|
@ -240,7 +240,9 @@ unitTest(
|
|||
assertEquals(bob.addr.hostname, "127.0.0.1");
|
||||
|
||||
const sent = new Uint8Array([1, 2, 3]);
|
||||
await alice.send(sent, bob.addr);
|
||||
const byteLength = await alice.send(sent, bob.addr);
|
||||
|
||||
assertEquals(byteLength, 3);
|
||||
|
||||
const [recvd, remote] = await bob.receive();
|
||||
assert(remote.transport === "udp");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue