Conversation
Adds tests for sending and receiving datagrams as strings and buffers from client->server and server->client. Switches offset/length around in `Uint8Array` constructor call as otherwise we send empty datagrams which get ignored. The test currently fails because the first datagram is received many times.
|
Opened as a draft because the tests don't pass currently. |
|
@jasnell I found a bit of weirdness in the implementation. It's mentioned in the test comments but if you call I would have thought that datagrams would be sendable after the After waiting for an arbitrary period the datagram is sent but is received multiple times. Is the user supposed to filter these duplicates out or is it an implementation bug? Finally if you close the server listener without first closing any active sessions a segfault occurs. If you do close the sessions first, the promise returned from the listener The segfault stack trace is: ..so it looks like maybe the client is still sending the duplicate datagrams to the server even after the session has been closed. |
|
The behaviour appears to be due to setting the When it's set, we hit this branch and add the same datagram to the outgoing packet over and over again hence all the duplicates. Setting the flag value to |
|
@achingbrain ... just FYI I haven't had the chance to take a look at this yet but I intend to soon! It will likely be in the next few days. Really appreciate your taking a look at this tho! |
Adds shared test helpers (checkQuic, defaultCerts, createQuicPair) and 17 subtests covering session close, session destroy, and endpoint close/destroy behavior. session.close() hangs on current main because handle.gracefulClose() never fires kFinishClose back to JS. Tests assert the documented contract and will fail until that is fixed. Refs: nodejs#60122 Refs: nodejs#60309 Refs: nodejs#57119
Adds tests for sending and receiving datagrams as strings and buffers from client->server and server->client.
Switches offset/length around in
Uint8Arrayconstructor call as otherwise we send empty datagrams which get ignored.The test currently fails because the first datagram is received many times.