#include <websocketcomponent.h>
Public Member Functions | |
| WebSocketComponentInstance (EntityInstance &entity, Component &resource) | |
| virtual | ~WebSocketComponentInstance () |
| virtual bool | init (utility::ErrorState &errorState) override |
| const WebSocketInterface & | getInterface () const |
| WebSocketInterface & | getInterface () |
Public Member Functions inherited from ComponentInstance | |
| ComponentInstance (EntityInstance &entity, Component &resource) | |
| virtual void | update (double deltaTime) |
| nap::EntityInstance * | getEntityInstance () const |
| nap::Component * | getComponent () const |
| template<typename T > | |
| T * | getComponent () const |
| virtual bool | init (utility::ErrorState &errorState) |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| virtual void | onDestroy () |
| Object (Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&)=delete | |
| Object & | operator= (Object &&)=delete |
Public Attributes | |
| nap::Signal< const WebSocketConnectionOpenedEvent & > | connectionOpened |
| nap::Signal< const WebSocketConnectionClosedEvent & > | connectionClosed |
| nap::Signal< const WebSocketConnectionFailedEvent & > | connectionFailed |
| nap::Signal< const WebSocketMessageReceivedEvent & > | messageReceived |
Public Attributes inherited from Object | |
| std::string | mID |
| Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Instance part of the WebSocketComponent, receives web-socket client and server events. Listen to the various signals to receive web-socket events in your application. The events are received on the main application thread. This object ensures thread-safety. Only web-socket events that originated from the given interface (client or server) are accepted.
| WebSocketComponentInstance | ( | EntityInstance & | entity, |
| Component & | resource | ||
| ) |
Constructor.
| entity | the entity this component belongs to. |
| resource | the original nap::WebSocketComponent |
|
virtual |
| WebSocketInterface& getInterface | ( | ) |
| const WebSocketInterface& getInterface | ( | ) | const |
|
overridevirtual |
Initialize this instance of the nap::WebSocketComponent.
| errorState | holds the error message when initialization fails. |
Reimplemented from ComponentInstance.
| nap::Signal<const WebSocketConnectionClosedEvent&> connectionClosed |
Occurs when a connection to a client or server is closed.
| nap::Signal<const WebSocketConnectionFailedEvent&> connectionFailed |
Occurs when a connection to a client or server failed to establish.
| nap::Signal<const WebSocketConnectionOpenedEvent&> connectionOpened |
Occurs when a new connection to a client or server is established.
| nap::Signal<const WebSocketMessageReceivedEvent&> messageReceived |
Occurs when a new message from a client or server is received.