Skip to content

Poller does not work on Windows #49

@andreaspetrovic

Description

@andreaspetrovic

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

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