GithubHelp home page GithubHelp logo

zeromqt's Introduction

Zeromqt - a Qt binding for ZeroMQ

(You may want to consiser using nzmqt instead - it's a cleaner implementation and is based on newer versions of the underlying API)

Zeromqt integrates ZeroMQ (version 2.1.0 and later) into the Qt event loop, mapping ZeroMQ message events onto Qt signals.

It also provides an API that is more "Qt-like" than the native ZeroMQ C or C++ APIs, allowing messages to be handled as QByteArrays and providing classes that are similar in style to QAbstractSocket.

Status

Pre-alpha.

There are no known bugs, but nor has there been any testing beyond the included sample app. It's being used as part of a large commercial application, though, so it'll be getting some testing and attention.

Usage

To use Zeromqt in a Qt project, add this to the projects .pro file

HEADERS += ZmqException.h ZmqMessage.h ZmqSocket.h ZmqContext.h
SOURCES += ZmqSocket.cc ZmqContext.cc
LIBS += -lzmq

and copy the six Zmq* files into the project.

Exceptions

Zeromqt uses C++ exceptions by default. You'll need to catch ZmqException objects in the normal way (which on Qt probably involves inheriting from QCoreApplication and reimplementing notify()).

There is untested support in the code for replacing exceptions with Qt-style errorString() error handling instead - look for USE_EXCEPTIONS

Sample

There's a single pub-sub sample included. Build it with qmake; make. Run the server with "./pubsubsample server foo" and the client with "./pubsubsample client foo".

More Information

Word to the Wise Labs

zeromqt's People

Contributors

steveatkins avatar wttw 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

zeromqt's Issues

Other Patterns

Hi wttw,
Do patterns other that PUB/SUB work..
I can't seem to succeed with even a simple REQ/REP.
Thanks.

Integration with Req-Reply mechanis

Pub-Sub works as expected, but Req-Reply uses the same file descriptor for read and write and QSocketNotifier forbids this. Need a notifier for read and another for write, for the same file descriptor.

Missing include definition

First of all, thanks for this "mashup" of qt and zmq. I intend I'll be using quite a bit of it. Just something minor. I needed to #include <stdint.h> in ZmqSocket.cc

License question

Hi,

First of all, thank you for sharing your code. Could you tell me which opensource license applies to it? Is it MIT? Apache 2.0?

Thanks,
Renault

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.