Disconnects the peer identified by id from the server. See WebSocketPeer.close for more information.
Returns the IP address of the given peer.
Returns the remote port of the given peer.
Returns true if a peer with the given ID is connected.
Returns true if the server is actively listening on a port.
Starts listening on the given port. You can specify the desired subprotocols via the "protocols" array. If the list empty (default), no sub-protocol will be requested. If true is passed as gd_mp_api, the server will behave like a network peer for the MultiplayerAPI, connections from non-Godot clients will not work, and dataReceived will not be emitted. If false is passed instead (default), you must call PacketPeer functions (put_packet, get_packet, etc.), on the WebSocketPeer returned via get_peer(id) to communicate with the peer with given id (e.g. get_peer(id).get_available_packet_count).
Stops the server and clear its state.
When not set to * will restrict incoming connections to the specified IP address. Setting bind_ip to 127.0.0.1 will cause the server to listen only to the local host.
When using SSL (see privateKey and sslCertificate), you can set this to a valid X509Certificate to be provided as additional CA chain information during the SSL handshake.
When set to a valid CryptoKey (along with sslCertificate) will cause the server to require SSL instead of regular TCP (i.e. the wss:// protocol).
When set to a valid X509Certificate (along with privateKey) will cause the server to require SSL instead of regular TCP (i.e. the wss:// protocol).
Construct a new instance of WebSocketServer. Note: use memnew!WebSocketServer instead.
A WebSocket server implementation.
This class implements a WebSocket server that can also support the high-level multiplayer API. After starting the server (listen), you will need to NetworkedMultiplayerPeer.poll it at regular intervals (e.g. inside Node._process). When clients connect, disconnect, or send data, you will receive the appropriate signal. Note: Not available in HTML5 exports.