mirror of
https://github.com/storytold/UE4-OSC.git
synced 2026-10-19 07:43:22 +00:00
add multicast
This commit is contained in:
@@ -13,8 +13,16 @@ class UOscSettings : public UObject
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Specify the [address:]port to listen to.
|
||||
*
|
||||
* e.g.
|
||||
* - "8000" listen to messages from any sender on port 8000. [default]
|
||||
* - "224.0.0.100:8000" listen multi-cast messages of group 224.0.0.100 on port 8000.
|
||||
* - "192.168.0.1:8000" listen messages addressed specifically to 192.168.0.1 on port 8000, useful if there are several addresses for this machine.
|
||||
*/
|
||||
UPROPERTY(Config, EditAnywhere, Category=Receive)
|
||||
int32 ReceivePort;
|
||||
FString ReceiveFrom;
|
||||
|
||||
UPROPERTY(Config, EditAnywhere, Category=Send)
|
||||
TArray<FString> SendTargets;
|
||||
@@ -24,6 +32,14 @@ public:
|
||||
|
||||
void Send(const uint8 *buffer, int32 length, int32 targetIndex);
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief Parse "8000" and "192.168.0.12" to IP and port values.
|
||||
* @return true if succeed
|
||||
*/
|
||||
static bool Parse(const FString & address_port, FIPv4Address * address, uint32_t * port);
|
||||
|
||||
private:
|
||||
TSharedRef<FSocket> _sendSocket;
|
||||
TArray<std::pair<FString, TSharedRef<FInternetAddr>>> _sendAddresses;
|
||||
|
||||
Reference in New Issue
Block a user