close


Description:

public void close (ushort code, string? data)

Close the connection in an orderly fashion.

Note that until the closed signal fires, the connection is not yet completely closed. The close message is not even sent until the main loop runs.

The code and data are sent to the peer along with the close request. Note that the data must be UTF-8 valid.

Parameters:

this

the WebSocket

code

close code

data

close data