-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shutting down after listenHTTP #1074
Comments
Yes, in the HTTP server the contexts are stored in g_contexts and have nothing to allow removing one. The listenTCP return type |
I wasn't meaning changing the ip/port on an already listening interface. So stop them all and create new based upon config. |
Yes I've wanted to have that for a while now, I know what you mean. The only issue I see is the necessity to have r/w locks or maybe an atomic fence on every request because |
Would it be possible to refactor the API out, so that the control of the connection is by the end user? |
Yes I've also imagined something like that. It would only require to pass the I think the |
Yeah, that works. All I need is some way to stop them. It's a blocker for daemon support. |
If you handle the
The TCPListener is defined as follows: interface TCPListener {
/// Stops listening and closes the socket.
void stopListening();
} So this should allow some more control over the TCP layer I guess |
Thanks, I was thinking about quick workarounds to allow me to change the port/restart the server at runtime, before this feature came up =) |
listenTCP and listenUDP allow for e.g. shutting down once started.
However listenHTTP does not return these connections, instead it just discards them.
Use case:
Linux daemon + reloading of config. To allow for changing of ports/ip's.
The text was updated successfully, but these errors were encountered: