# SocketTask.close(Object object)

Disables the WebSocket connection

# Parameters

# Object object

Attribute Type Default Required Description
code number 1000 (indicating that the connection is disabled normally) No A numeric value indicates the status code explaining why the connection has been disabled.
reason string No A readable string explaining why the connection has been disabled. This string must be a UTF-8-encoded text (not characters) with not more than 123 bytes.
success function No The callback function for a successful API call
fail function No Callback function for failed API call
complete function No Callback function used when API call completed (always executed whether call succeeds or fails)