rsocket-cpp
rsocket-cpp copied to clipboard
Pause accepting new connections but continue serving existing ones
In one of the projects that will use RSocket, there are two functions to pause or stop the server, which is to be replaced by RSocketServer. (see: BaseThriftServer)
- stop
- stopListening
Stop is just calling rsocketServer->showdownAndWait().
But we miss the stopListening
functionality which should only pause accepting new connections and continue serving the existing ones.
I wonder if we should have functionality to pause accepting new connections or creating new streams, i.e. if we have a higher level logic that checks the load and tries to save the server from getting overloaded.