I have a listen on a socket. I need to be able to cancel the listen when I “max out” my connections then restart the listen when my connections are no longer “maxed” I tried simply shutting down the socket then opening a new one with the same parameter. The socket(…) call works but I can not bind the new socket. I even tried turning on SO_REUSEADDR via setsockopt. Is there any way to do this with the limited socket api?
You also need reuseport feature as well which is not implemented in current Net+Os version.