Skip to content

[Bug]: IPAddress::getInterfaceBroadcastAddress is unimplemented on Windows, breaking NetworkServiceDiscovery::Advertiser #1711

Description

@MariaGraziaCorino

Detailed steps on how to reproduce the bug

Create an advertiser in any JUCE app:

juce::NetworkServiceDiscovery::Advertiser advertiser { "_test._udp", "TestService",
41111, 42113,
juce::RelativeTime::seconds (1.5) };

Nothing is ever broadcast. A UDP listener bound to port 41111, on the same machine or on another host on the same subnet, receives zero datagrams, and no error or assertion is raised. The same code on macOS advertises normally.

The cause is in modules/juce_core/native/juce_Network_windows.cpp:

IPAddress IPAddress::getInterfaceBroadcastAddress (const IPAddress&)
{
// TODO
return {};
}

What is the expected behaviour?

The advertiser broadcasts its announcement on each interface's broadcast address, so listeners on the subnet discover the service.

Operating systems

Windows

What versions of the operating systems?

Windows 11

Architectures

x86_64

Stacktrace

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

I have not tested against the develop branch

Code of Conduct

  • I agree to follow the Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions