NetworkWebSocketSignalInterface Class Reference

#include <network_websocket.h>

Inheritance diagram for NetworkWebSocketSignalInterface:

Public Member Functions

 MAXON_OBSERVABLE (Result< String >, ObservableHandshake,(const NetworkWebSocketConnectionRef &webSocket, const DataDictionary &request), ObservableCombinerRunAllComponent)
 
 MAXON_OBSERVABLE (Result< void >, ObservableConnected,(const NetworkWebSocketConnectionRef &webSocket, const DataDictionary &request), ObservableCombinerRunAllComponent)
 
 MAXON_OBSERVABLE (void, ObservableDisconnected,(const NetworkWebSocketConnectionRef &webSocket), ObservableCombinerRunAllComponent)
 
 MAXON_OBSERVABLE (void, ObservableError,(const NetworkWebSocketConnectionRef &webSocket, const Error &err), ObservableCombinerRunAllComponent)
 
 MAXON_OBSERVABLE (Result< void >, ObservableMessage,(const NetworkWebSocketConnectionRef &webSocket, WEBSOCKET_OPCODE opCode, const BaseArray< Char > &data), ObservableCombinerRunAllComponent)
 

Private Member Functions

 MAXON_INTERFACE (NetworkWebSocketSignalInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.networkwebsocketsignal")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( NetworkWebSocketSignalInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.interface.networkwebsocketsignal"   
)
private

◆ MAXON_OBSERVABLE() [1/5]

MAXON_OBSERVABLE ( Result< String ,
ObservableHandshake  ,
(const NetworkWebSocketConnectionRef &webSocket, const DataDictionary &request)  ,
ObservableCombinerRunAllComponent   
)

Signal fired when the handshake is received and before sending back the handshake.

Returns
Returns optional additional header entries. they needs to be terminated by "\r\n".

◆ MAXON_OBSERVABLE() [2/5]

MAXON_OBSERVABLE ( Result< void >  ,
ObservableConnected  ,
(const NetworkWebSocketConnectionRef &webSocket, const DataDictionary &request)  ,
ObservableCombinerRunAllComponent   
)

Signal fired when the connection has been established.

◆ MAXON_OBSERVABLE() [3/5]

MAXON_OBSERVABLE ( void  ,
ObservableDisconnected  ,
(const NetworkWebSocketConnectionRef &webSocket)  ,
ObservableCombinerRunAllComponent   
)

Signal fired when the connection has been closed.

◆ MAXON_OBSERVABLE() [4/5]

MAXON_OBSERVABLE ( void  ,
ObservableError  ,
(const NetworkWebSocketConnectionRef &webSocket, const Error &err)  ,
ObservableCombinerRunAllComponent   
)

Signal fired when the connection throws an error.

◆ MAXON_OBSERVABLE() [5/5]

MAXON_OBSERVABLE ( Result< void >  ,
ObservableMessage  ,
(const NetworkWebSocketConnectionRef &webSocket, WEBSOCKET_OPCODE opCode, const BaseArray< Char > &data)  ,
ObservableCombinerRunAllComponent   
)

Signal fired when the connection receives a message.