HttpWebSocket
Methods
send
Sends a message to the connected WebSocket.
:send(message: string | buffer): ()
Parameters
message: string | buffer
- The message to send.
Throws
- Memory Error
- WebSocket Error
close
Closes the WebSocket connection.
:close(code: number?): ()
Parameters
code: number?
- The close code to send.- default:
1000
- default:
Throws
- Memory Error
- WebSocket Error
isConnected
Returns if the WebSocket is connected.
:isConnected(): boolean
Last updated on