|
|
sybperl-l Archive
Up Prev Next
From: mpeppler at itf dot ch (Michael Peppler)
Subject: Re: socket problem
Date: Feb 1 1996 3:36PM
From: Richard Lee
> We are running Perl 5.001 with sybperl 2, and having intermittent
> socket disconnect problems with the following codes. The connection
> will just drop in middle of transmission, which caused a PIPE signal.
[...deleted...]
> $ret = printf SL_LOANET_HANDLE "%s", $CLIENT_REQUEST ;
> ......
> recv(SL_LOANET_HANDLE,$LOANET_RETURN,240,$FLAGS);
I wonder if that printf might be the problem... I haven't done much
socket() programming with Perl, but I wouldn't be surprised if printf
did some strange stuff, including buffering and the like. Maybe you
should use syswrite() instead, as in
syswrite(SL_LOANET, $CLIENT_REQUEST, 240);
which actually calls write(2).
Michael
|