#include <ImFusion/Core/ByteBuffer.h>
#include <ImFusion/GL/SharedImageSet.h>
#include <ImFusion/Stream/Network/WebsocketClient.h>
#include <ImFusion/Stream/Network/WebsocketServer.h>
#include <ImFusion/Stream/Serialization.h>
int main()
{
websocketServer.sendMessage(*msg);
});
});
websocketClient.connect(10000);
websocketClient.sendMessage("Hello world!");
websocketClient.disconnect();
websocketServer.stop();
if (sendBuffer)
{
}
if (receivedData)
{
}
}
Const view onto a sized buffer of raw binary data.
Definition ByteBuffer.h:36
Container for any number of Data instances such as image or meshes.
Definition DataList.h:30
ProtectedSignal< std::shared_ptr< Payload > > signalNewMessage
Signal emitted when a new message is received.
Definition ConnectionBase.h:41
WebSocket client implementation providing bidirectional communication.
Definition WebsocketClient.h:23
Websocket server implementation providing bidirectional communication.
Definition WebsocketServer.h:26
bool run() override
Starts listening for incoming connections.
Set of images independent of their storage location.
Definition SharedImageSet.h:42
std::optional< ByteBuffer > dataToByteBuffer(const DataList &data)
Serializes a DataList into a ByteBuffer for streaming and data transfer over a network.
std::optional< OwningDataList > dataFromByteBuffer(const ByteBufferView &buffer)
Deserializes a ByteBuffer with content generated via dataToByteBuffer() back to an OwningDataList.
Namespace of the ImFusion SDK.
Definition Assert.h:7