Skip to content

Instantly share code, notes, and snippets.

@mythosil
Created July 30, 2011 03:32
Show Gist options
  • Save mythosil/1115162 to your computer and use it in GitHub Desktop.
Save mythosil/1115162 to your computer and use it in GitHub Desktop.
echo server using zeromq
use strict;
use warnings;
use ZeroMQ qw/:all/;
my $server_addr = 'tcp://127.0.0.1:1986';
my $context = ZeroMQ::Context->new;
my $sock = $context->socket(ZMQ_REP);
$sock->bind($server_addr);
while (1) {
my $msg = $sock->recv;
$sock->send($msg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment