HDK
|
#include <NET_WebSocketMonitor.h>
Public Member Functions | |
bool | connect (const NET_WebSocketSPtr &websocket) |
Connect to a remote server using url. This will generate a CONNECTED or CONNECT_ERROR. More... | |
void | run () |
Run the dispatcher. This will loop forever until you tell it to stop running. More... | |
void | poll () |
Run through the event loop exactly once. More... | |
void | stop () |
Tell the dispatcher to stop. More... | |
SYS_NO_DISCARD_RESULT bool | isRunning () const |
Check if the monitor is running. This will only return true if the monitor is currently in the event loop from a run() call. More... | |
Static Public Member Functions | |
static NET_WebSocketMonitor & | instance () |
The WebSocketMonitor is the class that monitors a set of fds. When an event occurs the websocket instance defines how the event should be handled.
Definition at line 34 of file NET_WebSocketMonitor.h.
bool NET_WebSocketMonitor::connect | ( | const NET_WebSocketSPtr & | websocket | ) |
Connect to a remote server using url. This will generate a CONNECTED or CONNECT_ERROR.
id | The user provided url |
url | The url for connecting to the remote host. |
timeout | The timeout before giving up. |
|
static |
|
inline |
Check if the monitor is running. This will only return true if the monitor is currently in the event loop from a run() call.
Definition at line 62 of file NET_WebSocketMonitor.h.
void NET_WebSocketMonitor::poll | ( | ) |
Run through the event loop exactly once.
void NET_WebSocketMonitor::run | ( | ) |
Run the dispatcher. This will loop forever until you tell it to stop running.
void NET_WebSocketMonitor::stop | ( | ) |
Tell the dispatcher to stop.