Skip to content
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

Poller does not work on Windows #49

Open
andreaspetrovic opened this issue Nov 22, 2024 · 1 comment
Open

Poller does not work on Windows #49

andreaspetrovic opened this issue Nov 22, 2024 · 1 comment

Comments

@andreaspetrovic
Copy link

andreaspetrovic commented Nov 22, 2024

I tried to poll a REQ socket on Windows 11 with zeromq version 4.3.5, but the poll function never returned the right result (checked with pyzmq). The problem is that zeromq the poll-item file descriptor is unsigned __int64 on 64 bit Windows system, whereas in the nim bindings it's always a cint. When using my own poll-item struct and bindings with uint64 as file descriptor, it works.

type
  PollItem = object
    sock: pointer
    fd: uint64
    events: cshort
    revents: cshort

proc myPoll(items: ptr PollItem, len: cint, timeout: clong): cint {.importc: "zmq_poll", dynlib: "libzmq-v142-mt-4_3_5".}

Cheers,
Andreas

@Clonkk
Copy link
Collaborator

Clonkk commented Nov 25, 2024

I don't have a windows machine so I cannot look at it; but if you make a PR i'll make sure to look at it.

Bonus point if you are familiar with windows and can make windows CI works 😄

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

2 participants