![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Stream/Network/ConnectionBase.h>
Templated base class providing an interface for client-server communication (e.g., WebSocket, TCP) or peer-to-peer communication (e.g., UDP). More...
Templated base class providing an interface for client-server communication (e.g., WebSocket, TCP) or peer-to-peer communication (e.g., UDP).
Built-in protocols for WebSocket, TCP, and UDP support std::string and ByteBuffer as payload types.
Public Member Functions | |
| virtual void | sendMessage (Payload message)=0 |
| Sends a message over the network connection. | |
Public Attributes | |
| ProtectedSignal< std::shared_ptr< const Payload > > | signalNewMessage |
| Signal emitted when a new message is received. | |
| ProtectedSignal< std::shared_ptr< const Payload > > | signalMessageSent |
| Signal emitted when a message is sent. | |
|
pure virtual |
Sends a message over the network connection.
Emits signalMessageSent after the message has been sent.
Implemented in ImFusion::Network::WebsocketClient< ImFusion::ByteBuffer >, ImFusion::Network::WebsocketClient< std::string >, ImFusion::Network::WebsocketServer< ImFusion::ByteBuffer >, and ImFusion::Network::WebsocketServer< std::string >.