Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to configure UdpMessagingModule at Runtime

I'm interested in using the Unreal Message Bus (UMB) for a project where I'll need to tunnel a game client to something that isn't a game server but is listening to the UMB that lives in the cloud. The trick is that determining the IP address of that not-a-game-server will be determined at runtime and will change over time meaning I can't just override it in DefaultEngine.ini. I'll be able to query for the IP address at runtime so I will have access to it when I need. The existing UdpMessagingModule doesn't appear to be set up to do that though.

Is there a way to do what I need and create a new tunnel outside of what UdpMessagingModule provides or do I need to extend it to allow for tunnels and bridges to be created outside of the module just reading it's own config file?

Here is an example of what I'd like to do:

 bool BridgeToCloud(const FString remoteAddress)
     FIPv4Endpoint UnicastEndpoint;
     FIPv4Endpoint MulticastEndpoint;
     if (!remoteAddress.IsEmpty())
         // bridge to our remote network address
         FIPv4Endpoint::Parse(TEXT(""), UnicastEndpoint);
         FIPv4Endpoint::Parse(remoteAddress, MulticastEndpoint);
         // no remote address given so use localhost for development purposes
         FIPv4Endpoint::Parse(TEXT(""), UnicastEndpoint);
         FIPv4Endpoint::Parse(TEXT(""), MulticastEndpoint);
     TSharedPtr<IMessageTransport, ESPMode::ThreadSafe> udpTransport = MakeShareable(FUdpMessageTransport(UnicastEndpoint, MulticastEndpoint, 1));
     MessageBridge = IMessagingModule::Get().CreateBridge(FMessageAddress::NewAddress(), bus.ToSharedRef(), udpTransport.ToSharedRef());
     return MessageBridge != nullptr;
Product Version: UE 4.20
more ▼

asked Apr 08 '19 at 02:52 PM in C++ Programming

avatar image

6 2 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question