Function WebSocketPeer.close

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.connectionClosed or WebSocketServer.clientDisconnected is received. Note: The HTML5 export might not support all status codes. Please refer to browser-specific documentation for more details.

void close (
  const(long) code = 1000L,
  const(String) reason = GodotStringLiteral().str()
) nothrow @nogc;