JavaScript (Flash) Binding

ZmqSocket.js

With ZmqSocket you can talk to zmq sockets from your JavaScript code. You can connect, send and receive string messages. As JavaScript does not support raw TCP connections, it uses Flash as a bridge. It is not a libzmq wrapper: it uses ZmqSocket.as at its core, which is a TCP socket wrapper, with the ZMTP protocol implemented to communicate with zmq sockets.

Download

Features

  1. Identities supported.
  2. Multipart messages supported.
  3. String messages supported.

Limitations

  1. Maximum message size is 2^32-10 bytes.
  2. Binary messages not supported.

Usage

  • To allow Flash to connect to a TCP socket, a socket policy file must be available on the same domain on port 843. See here and here. The latter has a simple Perl socket server script socketpolicy.pl, which must be started by root.
  • Test code using ZmqSocket.

Issue tracker

License

GNU GPL v3