Skip to content

windows usage #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fuxey opened this issue Mar 31, 2020 · 0 comments
Open

windows usage #2

fuxey opened this issue Mar 31, 2020 · 0 comments

Comments

@fuxey
Copy link

fuxey commented Mar 31, 2020

Hi, i am using this lib for linux, no prob works great! (i have several avahi linux devices)
for windows there are some things to change:

  • INADDR_BROADCAST (255.255.255.255) is for some reason not working, use Multicast address instead: inet_addr ("224.0.0.1"); or use the local broadcast address: e.g.: inet_addr("192.168.1.255)

if you want to compile it with mingw (e.g.: Qt Creator)

  • add target_link_libraries(basic_demo ws2_32 wsock32) in CMakeFile
  • add in the basic_demo/main.cpp
    #define _WIN32_WINNT _WIN32_WINNT_WIN10
    #include <Ws2tcpip.h>
    #include <w32api.h>

maybe someone can explain to me why the 255.255.255.255 broadcast address is not working, but the local broadcast 192.168.1.255 or the multicast 224.0.0.1 is working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant