You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
459 B

#!/usr/bin/env perl
use lib 'lib';
BEGIN {
$ENV{ZMQ_PERL_BACKEND} = 'ZMQ::LibZMQ3';
}
use ZMQ;
use ZMQ::Constants ':all';
use Protocol::Zebra::Label;
my $p = Protocol::Zebra::Label->new();
my $data = $p->format({ name => 'sw2 192.168.1.11', price => '', barcode => '', count => 1 });
my $ctx = ZMQ::Context->new(1);
my $push = $ctx->socket(ZMQ_PUSH);
$push->connect('tcp://192.168.1.82:9999') == 0 or die "Can't connect:$!";
$push->sendmsg($data);