[Xitami] LRWP problem

B.P. thingieStuff at gamebox.net
Fri Apr 6 15:49:15 CEST 2007


Hi all,

Has anyone tried to make a LRWP client in PERL?
I don't know what I'm doing wrong, but I can't seem to get any response from
the LRWP agent when my script is connecting :

---- start of script ----
# name of the server extension programme (accessible with
http://localhost/test)
$nameLRWP = 'test';

push @INC, 'G:/Prog/perl';
use IO::Socket::INET;

# launch TCP connection
$canalLRWP = IO::Socket::INET->new('PeerAddr', '127.0.0.1', 'PeerPort',
'81', 'Proto', 'tcp');
$canalLRWP->connected() or die 'can\'t connect!';

binmode($canalLRWP);
$canalLRWP->autoflush(1);

# send the startup string
print $canalLRWP "$nomLRWP\xFF\xFF";

# echo back (to STDOUT) whatever was read from socket, and output a simple
message to the LRWP agent
while($request = <$canalLRWP>)
{
print "Request :\n$request\n";
print $canalLRWP '000000009', 'All right';
}

# close the socket
$canalLRWP->shutdown(2);
---- end of script ----


In the DOS32 console window, XITAMI tells me that the connection was
successful (xilrwp: Peer test connected for <any> host), but no answer on
the socket (should be "OK" or "ERROR ..."). Besides, even a simple HTML form
cannot seem to POST its data to my program. It seems the whole thing can't
get past that OK/ERROR part of the protocol.

Any clue anyone?
Thanks

Bruno



More information about the Xitami mailing list