[tpop3d-discuss]Corrupted TOP response with PIPELINING and tpop3d
1.5.3
Martin Blapp
mb at imp.ch
Thu, 3 Feb 2005 00:58:37 +0100 (CET)
Hi,
> Yep - seems to work - I don't see the truncation anymore,
> but something does still not work. Maybe I'm running into
> a timeout.
It works up to the last message in the output, then it stops
receiving (also tested with 1000 messages, the result is the
same).
On the last lines $s->getline() seems to hang in the message.
What I'm doing wrong in the perlscript ?
use IO::Socket;
$s = new IO::Socket::INET("localhost:110");
$s->print("user USER\r\n");
$s->getline();
$s->print("pass SOMEPASS\r\n");
$s->getline();
$s->print("LIST\r\n");
for ($i = 1; $i < 100; ++$i) {
$j=1 + $i;
$s->print("top $j 0\r\n");
}
for ($y=1; $y <= 100; $y++) {
print "Prozessed $y\n";
while(1) {
print "Prozessing Line\n";
$_ = $s->getline();
print "Got Line " . $_;
if ($_ =~ /\.\r\n/ || $_ =~ /^+OK/) {
break;
}
}
}
$s->print("quit\r\n");
print $s->getline();