5#include "CoreMinimal.h"
15class VOXTAAUDIOUTILITY_API
AudioWebSocket :
public TSharedFromThis<AudioWebSocket>
29#pragma region public API
49 bool Connect(
const FGuid& sessionId);
58 void Close(
int code = 1000,
const FString& reason = FString());
66 void Send(
const void* buffer,
unsigned int nBufferBytes);
73 void Send(
const FString& message);
78 TSharedPtr<IWebSocket> m_socketConnection;
@ Close
Definition MessageType.h:41
IWebSocket::FWebSocketClosedEvent OnClosedEvent
Called when a web socket connection has been closed.
Definition AudioWebSocket.h:26
bool Connect(const FGuid &sessionId)
Create the websocket through FWebSocketsModule and start up the connection.
Definition AudioWebSocket.cpp:22
void Send(const void *buffer, unsigned int nBufferBytes)
Send binary data through the websocket.
Definition AudioWebSocket.cpp:107
IWebSocket::FWebSocketConnectedEvent OnConnectedEvent
Called when a web socket connection has been established successfully.
Definition AudioWebSocket.h:20
AudioWebSocket(const FString &serverIP, uint16 serverPort)
Register the address and port the socket should use to connect with VoxtaServer.
Definition AudioWebSocket.cpp:9
IWebSocket::FWebSocketConnectionErrorEvent OnConnectionErrorEvent
Called when a web socket connection could not be established.
Definition AudioWebSocket.h:23