Skip to main content
Version: Next

Stopping the server

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();