[DGD] API requirements for networking extensions

Felix A. Croes felix at dworkin.nl
Sat Jun 10 12:14:35 CEST 2017


Raymond Jennings <shentino at gmail.com> wrote:

> Just out of curiosity, what was the purpose of diverting this work into a
> separate thread?

Handling many UDP connections.

Each TCP socket has its own queue for incoming packets, managed by the OS.
DGD has one TCP socket per TCP user.  However, there can be only one socket
per open UDP port, with only one OS queue which easily overflows.  Therefore
DGD has to do what Hydra had already been doing for a long time: take UDP
packets out of this queue as quickly as possible, and forward them to DGD's
own per-user UDP queues.

That requires a dedicated thread, since receiving UDP packets for 1000 users
might already overflow the OS queue while executing a single LPC task.

Regards,
Felix Croes



More information about the DGD mailing list