in my app, I need to have several sockets in use. So I want to know how best to check I have sockets available - to protect the code from running out of sockets.
I will have a httplistener running on one socket; I’ll have (or at least I want to have) DHCP enabled, thats another socket down; and I periodically will need to do other network tasks (HTTP webservice push to remote servers, occasional NTP updates) that need to be able to access the network at different intervals.
Is the suggested approach purely wrap every socket creation step in try/catch blocks? Is there any other pre-emptive check i can do?
In particular I I’m still optimising my UDP network time code on