#include <websocketserver.h>
Public Member Functions | |
IWebSocketServer (WebSocketService &service) | |
virtual bool | init (utility::ErrorState &errorState) override |
virtual void | onDestroy () override |
virtual void | onMessageReceived (const WebSocketConnection &connection, const WebSocketMessage &message)=0 |
virtual void | onConnectionOpened (const WebSocketConnection &connection)=0 |
virtual void | onConnectionClosed (const WebSocketConnection &connection, int code, const std::string &reason)=0 |
virtual void | onConnectionFailed (const WebSocketConnection &connection, int code, const std::string &reason)=0 |
![]() | |
WebSocketInterface (WebSocketService &service) | |
virtual | ~WebSocketInterface () |
template<typename T > | |
T & | as () |
template<typename T > | |
const T & | as () const |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
ResourcePtr< WebSocketServerEndPoint > | mEndPoint |
Property: 'EndPoint' the server endpoint that manages all client connections. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
![]() | |
void | addEvent (WebSocketEventPtr newEvent) |
![]() | |
std::queue< WebSocketEventPtr > | mEvents |
std::mutex | mEventMutex |
WebSocketService * | mService = nullptr |
Interface for all web-socket servers. Derive from this class to implement your own web-socket server. On initialization the client registers itself with a nap::WebSocketClientEndPoint.
IWebSocketServer | ( | WebSocketService & | service | ) |
Constructor
service | the web-socket service that forwards events to the application. |
|
overridevirtual |
Registers the web-socket server interface with the endpoint.
errorState | contains the error if initialization fails. |
Reimplemented from WebSocketInterface.
Reimplemented in PortalWebSocketServer.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
overridevirtual |
Unregisters the web-socket server interface with the endpoint.
Reimplemented from Object.
Reimplemented in PortalWebSocketServer.
|
pure virtual |
ResourcePtr<WebSocketServerEndPoint> mEndPoint |
Property: 'EndPoint' the server endpoint that manages all client connections.