Code Comments
Programming Forum and web based access to our favorite programming groups.
> -----Message d'origine-----
> De=A0: mgoland@optonline.net [mailto:mgoland@optonline.net]
> Envoy=E9=A0: mardi 29 mars 2005 16:48
> =C0=A0: Peter Rabbitson
> Cc=A0: beginners@perl.org
> Objet=A0: Re: simple server app
>=20
>=20
>=20
> ----- Original Message -----
> From: Peter Rabbitson <rabbit@rabbit.us>
> Date: Tuesday, March 29, 2005 5:04 am
> Subject: simple server app
>=20
> Hello,
>=20
> If it's just a bit of data exchange you can use a simple server to
> accomplish this task, and possibly build your own protocol for data
> exchange. Below is a simple server example.
>=20
> #!PERL
>=20
> use warnings;
> use strict;
> use IO::Socket::INET;
> $|=3D1;
> my $sock =3D IO::Socket::INET->new( Listen =3D> 5,
> LocalAddr =3D> '127.0.0.1',
> LocalPort =3D> 9000,
> Proto =3D> 'tcp') or die "ERROR:
$!\n";
>=20
>=20
> if( my $session =3D $sock->accept() ){
>=20
> print "connection from: ",$session->peerhost,"\n";
> my $msg=3D<$session>;
> print "Received: $msg";
> }
> else{
> die "Error on Socket $!\n";
> }
>=20
>=20
> your welcome, hope it helps let us know if you have more issue's at
hand.
> Mar G.
>=20
+1
I second this approach.
Going for the full RPC::XML (or SOAP::Lite) just to exchange
4 strings seems an overkill to me.
You don't need HTTP transport since I suppose your two boxes
(Linux and Windows) belong to the same LAN ...
A simple server like the one suggested here should be enough.
Just my 0.02
BR,
Jos=E9.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.