Class WebsocketBroadcastServer
Defined in File websocket.h
Inheritance Relationships
Base Type
public O3DS::Websocket(Class Websocket)
Class Documentation
- 
class WebsocketBroadcastServer : public O3DS::Websocket
 Public Types
- 
typedef std::set<connection_hdl, std::owner_less<connection_hdl>> TConnectionList
 
Public Functions
- 
WebsocketBroadcastServer()
 
- 
virtual void stop() override
 
- 
virtual bool start(const char *url) override
 Starts the connector, often using nng_dial or nng_listen.
- 
virtual bool write(const char *data, size_t len) override
 Write bytes - len is the size of data.
- 
virtual size_t read(char *data, size_t len) override
 Read bytes - len is the fixed size of buffer, returns the number of bytes read.
- 
virtual size_t read(char **data, size_t *len) override
 Read a message, realloc and rezie *data if needed. If the buffer is reszied, len will be updated. Returns the size of the message, which may be less than the buffer size
- 
inline void onOpen(connection_hdl hdl)
 
- 
inline void onClose(connection_hdl hdl)
 
- 
typedef std::set<connection_hdl, std::owner_less<connection_hdl>> TConnectionList