Simple websocket client.
Signature | hs.websocket.new(url, callback) -> object |
---|---|
Type | Function |
Description | Creates a new websocket connection. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/websocket/libwebsocket.m line 120 |
Signature | hs.websocket:close() -> object |
---|---|
Type | Method |
Description | Closes a websocket connection. |
Parameters |
|
Returns |
|
Source | extensions/websocket/libwebsocket.m line 235 |
Signature | hs.websocket:send(message[, isData]) -> object |
---|---|
Type | Method |
Description | Sends a message to the websocket client. |
Parameters |
|
Returns |
|
Notes |
contains invalid UTF8 character sequences (the default string behavior is to make sure everything is "printable" by converting invalid sequences into the Unicode Invalid Character sequence). |
Source | extensions/websocket/libwebsocket.m line 164 |
Signature | hs.websocket:status() -> string |
---|---|
Type | Method |
Description | Gets the status of a websocket. |
Parameters |
|
Returns |
|
Source | extensions/websocket/libwebsocket.m line 199 |