rbi has asked for the wisdom of the Perl Monks concerning the following question:
In old installations this did work very well. My problem is that on two recent installations of Linux (kernel 2..6.16) I don't get any data back ($sRet == 0). But with tcpdump I can see that the query results are coming back to the Linux box. No firewall is installed. I've tried with Socket.pm versions 1.25 and 1.30.my $oSocket = IO::Socket::INET->new(PeerAddr => $HostName, + PeerPort => $Port, + Proto => "tcp", Timeout => $SocketTimeout, Type => 'SOCK_STREAM'); my $sSend = "<?xml version=\"1.0\"?> <request>" . "<connectionstring>" . $ConnectionString . "</connectionstring>" . "<sql><![CDATA[" . $sSQL . "]]></sql></request>"; + my $sRet=""; eval { local *FH = $oSocket; print FH $sSend; my $data_read; #read the response while (recv(FH, $data_read, 4096,0)) { + $sRet .= $data_read; last if ($data_read =~ /<\/xml>/i); + } }; die if (length($sRet) == 0)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: No data received on client socket
by ikegami (Patriarch) on Sep 19, 2006 at 17:11 UTC | |
by rbi (Monk) on Sep 19, 2006 at 17:24 UTC | |
by ikegami (Patriarch) on Sep 19, 2006 at 18:27 UTC | |
by rbi (Monk) on Sep 19, 2006 at 19:42 UTC | |
|
Re: No data received on client socket
by caelifer (Scribe) on Sep 19, 2006 at 19:51 UTC | |
by ikegami (Patriarch) on Sep 19, 2006 at 20:54 UTC | |
by caelifer (Scribe) on Sep 20, 2006 at 13:29 UTC | |
by ikegami (Patriarch) on Sep 20, 2006 at 15:14 UTC | |
by caelifer (Scribe) on Sep 20, 2006 at 20:20 UTC | |
| |
by rbi (Monk) on Sep 19, 2006 at 20:27 UTC | |
by caelifer (Scribe) on Sep 19, 2006 at 21:16 UTC | |
by rbi (Monk) on Sep 20, 2006 at 15:07 UTC | |
by ikegami (Patriarch) on Sep 20, 2006 at 15:19 UTC | |
|
Re: No data received on client socket
by aufflick (Deacon) on Sep 20, 2006 at 05:13 UTC | |
by rbi (Monk) on Sep 20, 2006 at 15:25 UTC | |
|
Re: No data received on client socket
by rbi (Monk) on Sep 21, 2006 at 14:59 UTC | |
by ikegami (Patriarch) on Sep 21, 2006 at 15:52 UTC | |
by rbi (Monk) on Sep 21, 2006 at 16:07 UTC |