Loading...
Searching...
No Matches
WebSocketClient::WebSocketClientDataProvider Class Reference

Event-based data provider for WebSocket messaging. More...

Inheritance diagram for WebSocketClient::WebSocketClientDataProvider:
[legend]

## Public Member Functions

| constructor (*hash< auto > options)
| Creates the object from constructor options.
| constructor (hash< auto > template_options, *hash< auto > options)
| Creates the object from constructor + template options.
Public Member Functions inherited from WebSocketClient::WebSocketClientDataProviderBase
| constructor (*hash< auto > options)
| Creates the object from constructor options.
| deregister ()
| Dergister a child data provider.
auto | deserializeMessage (data msg)
| Deserializes the message.
Queue | getQueue ()
| Returs the child message queue.
abstract | notifyObservers (string msg_id, hash< auto > event)
| For WS event notifications.
| register (WebSocketClientWaitForMessageDataProvider child)
| Regstiger a child data provider.
data | serializeMessage (auto msg)
| Serializes the message for sending.

## Public Attributes

const | ProviderInfo
| Provider info.
Public Attributes inherited from WebSocketClient::WebSocketClientDataProviderBase
const | ApiClasses
| Registered API classes.
const | ConstructorOptions
| Constructor options.
const | ProviderInfo
| Provider info.
const | SerializationMap = ...
| Set of serialization options as a hash.

## Additional Inherited Members

Static Public Member Functions inherited from WebSocketClient::WebSocketClientDataProviderBase
static hash< auto > | getOptionsFromTemplate (hash< auto > template_options, *hash< auto > options)
| Returns options from a template.
Protected Member Functions inherited from WebSocketClient::WebSocketClientDataProviderBase
| event (*data msg)
| Called when a WebSocket event arrives.
*AbstractDataProvider | getChildProviderImpl (string name)
| Returns the given child provider or NOTHING if the given child is unknown.
*list< string > | getChildProviderNamesImpl ()
| Returns a list of child data provider names.
hash< string, hash< DataProviderMessageInfo > > | getEventTypesImpl ()
| Returns a hash of all supported event types.
hash< string, hash< DataProviderMessageInfo > > | getMessageTypesImpl ()
| Returns the description of an outbound message, if any.
Mutex | m ()
| Mutex for wait for message child data provider handling.
| pong (*data msg)
| Got a pong message.
| sendMessageImpl (string message_id, auto msg, *hash< auto > send_message_options)
| Sends a message from message-capable data providers.
| start ()
| Connects and starts receiving messages.
| unsupportedSerialization ()
| Throws an UNSUPPORTED-SERIALIZATION error.
Protected Attributes inherited from WebSocketClient::WebSocketClientDataProviderBase
WebSocketClientWaitForMessageDataProvider | child
| Wait for message API data provider.
WebSocketClient | client
| The web socket client itself.
Queue | q
| Child message queue.
bool | report_pings
| report pings
string | serialization
| Data serialization.

## Detailed Description

Event-based data provider for WebSocket messaging.

The event ID raised for WebSocket data events is `"ws-data-event"` (see EVENT_WS_DATA), and, when the connection is closed, a `"ws-closed-event"` (see EVENT_WS_CLOSED) is raised.