HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_WebSocketMonitor Class Reference

#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_WebSocketMonitorinstance ()
 

Detailed Description

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.

Member Function Documentation

bool NET_WebSocketMonitor::connect ( const NET_WebSocketSPtr websocket)

Connect to a remote server using url. This will generate a CONNECTED or CONNECT_ERROR.

Parameters
idThe user provided url
urlThe url for connecting to the remote host.
timeoutThe timeout before giving up.
Returns
True if the connection and upgrade was a success.
static NET_WebSocketMonitor& NET_WebSocketMonitor::instance ( )
static
SYS_NO_DISCARD_RESULT bool NET_WebSocketMonitor::isRunning ( ) const
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.

Returns
True if the monitor is running.

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.


The documentation for this class was generated from the following file: