onIdle abstract method
void
onIdle(
- void onIdle()
Specifies a callback called when the server is idle, i.e.,
- not serving any requests (connectionCount is 0).
- It is useful if you'd like to stop the server gracefully:
-
server.onIdle(() => server.stop());
- In additions, you can do some house cleaning here too.
-
- See also connectionCount and shallCount.
Implementation
void onIdle(void onIdle());