WebSocketPeerClose Method |
Closes this WebSocket connection. code is the status code for the closure (see RFC 6455 section 7.4 for a list of valid status codes). reason is the human readable reason for closing the connection (can be any UTF-8 string that's smaller than 123 bytes).
Note: To achieve a clean close, you will need to keep polling until either WebSocketClient.connection_closed or WebSocketServer.client_disconnected is received.
Note: The HTML5 export might not support all status codes. Please refer to browser-specific documentation for more details.
Namespace: Godot
public void Close( int code = 1000, string reason = "" )
[Missing <param name="code"/> documentation for "M:Godot.WebSocketPeer.Close(System.Int32,System.String)"]
[Missing <param name="reason"/> documentation for "M:Godot.WebSocketPeer.Close(System.Int32,System.String)"]