in reply to Re: shared memory and objects
in thread shared memory and objects
Or communicate it thru Socket:
Client: use Storable qw(freeze); use IO::Socket; use strict; use warnings; my $c = new IO::Socket::INET(Proto => "udp", PeerAddr => "localhost", PeerPort => 3000, Timeout => 1); print "Connected\n"; my $h = {"key" => [1,2,3,4,5,6,7,8,9,10]}; my $arr_freezed = freeze($h); $c->send($arr_freezed); close $c; Server: use IO::Socket; use Storable qw(thaw); use Data::Dumper; use strict; use warnings; my $server = new IO::Socket::INET(Timeout => 7200, Proto => "udp", LocalPort => 3000, LocalHost => "localhost"); print "Server is listening ...\n"; my $arr_freezed; $server->recv($arr_freezed, 1000); my $h = thaw($arr_freezed); print Dumper($h); close $server;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: shared memory and objects
by pg (Canon) on Oct 25, 2004 at 20:14 UTC | |
by NetWallah (Canon) on Oct 25, 2004 at 21:01 UTC |