If you have a listening socket, is there an mbed3 api way to delay it processing accepts?
The server may choose to restrict some resource necessary for accepted connection processing, so that the number of simultaneous pending connects cannot affect total allocation of this resource. For example accepted connects may perform mallocs, if there is no management of the dynamic number of accepted connects the device can be DoS'd by firing a bunch of connect requests at it simultaneously.
In that case the best way to control it is when the resource pool is busy, listen socket accepts are stopped from happening, they are not rejected just on hold in the request queue. Normally in Posix this is explicitly done in the server and you modulate accepts by, eg, temporarily disabling the listen socket POLLIN on poll().
How can the same thing be achieved cleanly in mbed3?
If you have a listening socket, is there an mbed3 api way to delay it processing accepts?
The server may choose to restrict some resource necessary for accepted connection processing, so that the number of simultaneous pending connects cannot affect total allocation of this resource. For example accepted connects may perform mallocs, if there is no management of the dynamic number of accepted connects the device can be DoS'd by firing a bunch of connect requests at it simultaneously.
In that case the best way to control it is when the resource pool is busy, listen socket accepts are stopped from happening, they are not rejected just on hold in the request queue. Normally in Posix this is explicitly done in the server and you modulate accepts by, eg, temporarily disabling the listen socket POLLIN on poll().
How can the same thing be achieved cleanly in mbed3?