This returns true or false based on which WebSocket servers are hosting.


It takes one parameter, which must be one of:

  • "secure" to turn off the secure WebSocket server only
  • "insecure" to turn off the insecure WebSocket server only
  • "both" to turn off both secure and insecure WebSocket servers

If any server is not hosting when told to stop hosting, no error will be made.


All clients on the WebSocket server(s) passed will be immediately disconnected.


Note that no Channel > On channel close, Connection > On disconnect and Channel > On Leave request or other leaving events will be triggered by leaving clients.

The regular Relay server and Flash hosting are not disconnected by this action. However, if they share channels with the regular server's clients, the channel's auto-close setting may close the channels and kick the regular Relay server's clients from those channels.

If this happens, the leave request will still not run, because it's not a request from the client.


You should use a channel loop or client loop before calling the Stop hosting action if you want to do something with the clients prior to disconnect.

Note the Client > Get client protocol implementation expression should always contain the text "HTML5" or "UWP JS" for WebSocket clients, as all WebSocket clients have implementation sent shortly as their next message after connection is approved.