Issue with NWConnection Dropping QUIC Datagrams Sent Every 20ms

Hello fellow developers and Apple support,

I'm experiencing a challenging issue with NWConnection when sending data via QUIC udp datagrams to multiple devices. I have a setup where I use NWListener to send data every 10 milliseconds to 10 or even 15 clients, which works flawlessly. However, when I switch to using NWConnection to send data every 20 milliseconds, I encounter significant packet loss, and the following error messages appear in the console:

nw_connection_create_with_connection_internal [C19] Original connection not yet connected
nw_connection_group_create_connection_for_endpoint_and_parameters [G2] failed to create connection with parameters QUIC, traffic class: 300, local: 0.0.0.0:9000, attribution: developer, attach protocol listener

This issue is mitigated when a second NWConnection is connected to the same NWListener, reducing the frequency of errors. By adding a third connection, the errors almost disappear, which suggests that the problem might be related to how a single NWConnection handles rapid data transmissions. This observation leads me to believe that the issue could be linked to the capacity or the management of connections under high throughput scenarios (200kb every 20ms).

I've thoroughly reviewed the documentation for NWConnection and NWListener, focusing on their QUIC protocols handling, without finding a clear cause or solution for this issue. I've also searched through forums and developer communities for similar problems but haven't found anything that matches my situation closely.

Thank you in advance for your time and help!

Issue with NWConnection Dropping QUIC Datagrams Sent Every 20ms
 
 
Q