Git Product home page Git Product logo

zeromq's Introduction

ZeroMQ bindings for the D programming language

This repository contains D bindings to the ZeroMQ C library (libzmq). It is part of Deimos and is maintained by the Deimos team.

Like all Deimos bindings, these are just D prototypes for the C functions. For a higher-level D wrapper, see e.g. zmqd

Usage

To use these bindings, simply add

import deimos.zmq.zmq;

to your D program and link it with the zmq library.

Versioning

Starting with v5.0.0, the version numbers of these bindings no longer correspond to upstream ZeroMQ versions. This allows us to follow the Semantic Versioning scheme and increment the version number when we make changes that do not correspond to upstream changes (e.g. to fix bugs in the bindings).

The corresponding ZeroMQ version is indicated after the bindings version, following a plus sign. For example, the tag v5.0.0+zmq-4-2-2 indicates bindings version 5.0.0, corresponding to ZeroMQ version 4.2.2.

Up to and including v4.2.2, the bindings versions corresponded exactly to upstream ZeroMQ versions.

Authors

These bindings were originally based on code by itiu. For the full list of contributors, see the Contributors page on GitHub.

zeromq's People

Contributors

1100110 avatar cybershadow avatar john-colvin avatar kyllingstad avatar lykathia avatar msoucy avatar reiroldan avatar repeatedly avatar seanenck avatar todayman avatar walterbright avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zeromq's Issues

ZMQ_ROUTER sockets do not receive any messages

On Solus Linux, with system-level ZeroMQ 4.2.2, a ZMQ_ROUTER type socket will not receive any messages, simply blocking forever. I tested it with both this binding and zmqd, and tried different combinations of req/dealer->rep/router, and consistently only the router socket was having any trouble.

If it makes any difference, the server and client are in separate D Threads, launched from the main thread. I tried both zmqd's global context and a manually created context from zmq_ctx_new.

To confirm, I compiled a few of ZeroMQ's C examples, and they function as expected.
I also created a local version 4.2.2, replacing the headers in the binding's C directory with the system-wide headers, and compiled my test program against that, to no avail.

EDIT: Also tested on latest master, to no effect.

examples does not compile

  • using DMD64 D Compiler v2.065
  • using libzmq 3.2.4
  • all unit tests have passed
dmd examples/hwserver.d
examples/hwserver.d(23): Error: function deimos.zmq.zmq.zmq_recv (void* s, void* buf, ulong len, int flags) is not callable using argument types (void*, zmq_msg_t*, int)
examples/hwserver.d(37): Error: function deimos.zmq.zmq.zmq_send (void* s, const(void*) buf, ulong len, int flags) is not callable using argument types (void*, zmq_msg_t*, int)

Version tags

This repository currently has no version tags. I would like to add tags so that Deimos/zeromq versions are equal to the ZeroMQ versions to which they correspond (v3.2.4, v4.0.3, etc.). Then, users can select the version of ZeroMQ they want to use via their dub.json file.

Unfortunately, it is impossible to submit "tag requests", so I'll have to do it manually. If I can just get an "OK" from someone, I'll get right on it.

Use of deprecated methods in examples?

I was trying to get some ZMQ stuff working in dlang and noticed that the code in zmq.d is indicated as deprecated for some of the methods used in the examples within this repo.

/*  Deprecated methods */
int zmq_device(int type, void* frontend, void* backend);
int zmq_sendmsg(void* s, zmq_msg_t* msg, int flags);
int zmq_recvmsg(void* s, zmq_msg_t* msg, int flags);

seems like the examples should use zmq_msg_recv and zmq_msg_send if those methods are really deprecated? More than willing to update the examples myself but wanted clarification

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.