C++ Stomp Protocol

Hello,
The documentation on the built in UE4 Stomp Protocol is very short. I was wondering if someone could provide a simple example on how to initiate IStompClient()? Or give me some feedback on what I’m doing wrong?

 #include "Runtime/Online/Stomp/Public/StompModule.h"
FStompModule mod1;
TSharedRef< IStompClient> client = mod1.CreateClient(FString(TEXT("HTTPADDRESS")));

When the Character.cpp is selected StompModule.h has errors.

The errors disappear when StompModule.h is selected making it difficult to debug.

Thanks, Any feedback is greatly appreciated!

you can do like this:
IModuleInterface * Stompi=FModuleManager::Get().LoadModule(TEXT("Stomp")); Stompi->StartupModule(); FStompModule* Mod = &FStompModule::Get(); StompClient = Mod->CreateClient(Url);

1 Like

url should websocket fotmat:
wss://+ip:port/ws
ws://+ip:port

1 Like