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

Identities supported.

Multipart messages supported.

String messages supported.

Limitations

Maximum message size is 2^32-10 bytes.

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.