Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 20 lines (15 sloc) 0.328 kb
8b5146a @rcaputo Prototype a Reflexive ZeroMQ socket, with basic publish and subscribe
authored
1 #!/usr/bin/env perl
2
3 use warnings;
4 use strict;
5
6 use ZmqSocket;
7 use ZeroMQ::Raw::Constants qw(ZMQ_PUB);
8
9 my $s = ZmqSocket->new(
10 socket_type => ZMQ_PUB,
11 endpoints => [ 'tcp://127.0.0.1:12345' ],
12 );
13
14 my $i = 0;
15 while (1) {
16 my $scalar = "debug: message " . ++$i;
17 print "$scalar = ", $s->send_scalar($scalar), "\n";
18 sleep 1;
19 }
Something went wrong with that request. Please try again.