The OpenD Programming Language

WebSocket.close

Closes the connection, sending a graceful teardown message to the other side.

Code 1000 is the normal closure code.

class WebSocket
void
close
(
int code = 1000
,
string reason = null
)

See Also

Meta

History

The default code was changed to 1000 on January 9, 2023. Previously it was 0, but also ignored anyway.