#include <websocketserver.h>
Public Member Functions | |
| IWebSocketServer (WebSocketService &service) | |
| virtual bool | init (utility::ErrorState &errorState) override |
| virtual void | onDestroy () override |
Public Member Functions inherited from WebSocketInterface | |
| WebSocketInterface (WebSocketService &service) | |
| virtual | ~WebSocketInterface () |
| template<typename T > | |
| T & | as () |
| template<typename T > | |
| const T & | as () const |
Public Member Functions inherited from Resource | |
| Resource () | |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| Object (Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&)=delete | |
| Object & | operator= (Object &&)=delete |
Public Attributes | |
| ResourcePtr< IWebSocketServerEndPoint > | mEndPoint |
| Property: 'EndPoint' the server endpoint that manages all client connections. More... | |
Public Attributes inherited from Object | |
| std::string | mID |
| Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Protected Member Functions | |
| 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 |
Protected Member Functions inherited from WebSocketInterface | |
| void | addEvent (WebSocketEventPtr newEvent) |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Protected Attributes inherited from WebSocketInterface | |
| 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::WebSocketClientEndPointBase.
| 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.
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
overridevirtual |
Unregisters the web-socket server interface with the endpoint.
Reimplemented from Object.
Reimplemented in PortalWebSocketServer.
|
protectedpure virtual |
| ResourcePtr<IWebSocketServerEndPoint> mEndPoint |
Property: 'EndPoint' the server endpoint that manages all client connections.