Code Monkey home page Code Monkey logo

Comments (9)

sphaero avatar sphaero commented on June 4, 2024

Windows is a bit of second class citizen I'm afraid. We just don't have much Windows devs I guess. I'm willing to have a look as well but I only have windows build hosts which never sleep. Do you have a code example showing the bug?

from czmq.

devlpr avatar devlpr commented on June 4, 2024

I'll see if I can create one. I'm 95% on Linux as well. Windows is not my favorite, but people want Windows software still so I need to support the use-case.

from czmq.

Asmod4n avatar Asmod4n commented on June 4, 2024

This is apparently how libuv does it: https://github.com/libuv/libuv/blob/master/src/win/detect-wakeup.c

from czmq.

sphaero avatar sphaero commented on June 4, 2024

Thanks for the ref! Seems only relevant for Win8 and later. Docs here: https://learn.microsoft.com/en-us/windows/win32/api/powerbase/nf-powerbase-powerregistersuspendresumenotification

from czmq.

devlpr avatar devlpr commented on June 4, 2024

Any idea what code would need to be registered there? If I know what needs to be added I can do the PR. I just don't know where the code is that does the enumeration on Windows. Any information is appreciated. Happy to contribute if I understand what to do.

from czmq.

devlpr avatar devlpr commented on June 4, 2024

I see some uses of GetAdaptersAddresses in libzmq/src/ip_resolver.cpp and czmq/src/ziflist.c. The use in ziflist.c seems most pertinent with the comment "// Helper to reload network interfaces from system". That seems to be what needs to happen here. Can anybody confirm that as the correct function to run on wake-up? If so, the next question will be what list to update with it.

from czmq.

devlpr avatar devlpr commented on June 4, 2024

On second thought, it seems that the ip_resolver.cpp usage ends up getting called in zpoller.c in s_rebuild_poll_set(). That's in the code path of zpoller_wait, which may make more sense.

from czmq.

sphaero avatar sphaero commented on June 4, 2024

You also could look into how zloop rebuilds the pollset if it is of any relevance.

s_rebuild_pollset (zloop_t *self)

However this might be one that needs to be done in libzmq as the sockets might need to be recreated?

from czmq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.