Anthony-Nicholls / jucey_bonjour

A JUCE module wrapper for Apple's zero-configuration protocol Bonjour
MIT License
12 stars 3 forks source link

advertised port numbers seem incorrect #16

Open jariseon opened 4 years ago

jariseon commented 4 years ago

mdns-sd is a gift to humanity. thanks for a really useful module. i was initially seeing weird port number advertisements, but resolved the issue with a tiny mod to this. DNSServiceRegister expects the port number in network byte order, so after wrapping the port numbers as htons(portToRegisterServiceOn) they were fine. i'm on mac, ancient xcode 9.3 and JUCE6.

btw, winrt seems to have limited support for mdns-sd, but i suppose the recommended way is to build and link against apple's bonjour SDK, or some other open source library ?

jariseon commented 4 years ago

update: i downloaded BonjourSDK3 for Windows from Apple's developer site, installed it and added the include path + lib file into Visual Studio's project settings. for an unknown reason VS 2019 freaked out with toUTF8() calls, but was happy after i changed those to toRawUTF8(). then booted up the build and it worked straight away in Windows without further code changes. very cool.