WebSocketServerListen Method |
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 data_received 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).
Namespace: Godot
public Error Listen( int port, string[] protocols = null, bool gdMpApi = false )
[Missing <param name="port"/> documentation for "M:Godot.WebSocketServer.Listen(System.Int32,System.String[],System.Boolean)"]
[Missing <param name="gdMpApi"/> documentation for "M:Godot.WebSocketServer.Listen(System.Int32,System.String[],System.Boolean)"]
[Missing <returns> documentation for "M:Godot.WebSocketServer.Listen(System.Int32,System.String[],System.Boolean)"]