Aerys\Websocket::onStop PHP Method

onStop() public method

If the application initialized resources in Websocket::onStart() this is the place to free them. This method is called right before the clients will be all automatically closed. There is no need to call Endpoint::close() manually in this method. If this method is a Generator it will be resolved as a coroutine before the server is allowed to fully shutdown. Additionally, if this method returns a Promise the server will not shutdown until that promise resolves.
public onStop ( )
    public function onStop();