Stopping the server
Asynchronous (recommended)
Using the async server stop method is recommended since it will disconnect all of the clients safely. You are able to give a reason which will be sent down to the clients. Naturally, it is optional.
await server.stopServerAsync("Server stop reason");
Synchronous
server.stopServer();