in reply to Socket buffer issue
«<Impact>» reads until a newline is received. If the first message is "blank", it's because there was nothing before the first newline.
Update: Well, that's not right. (Tired today.) But then, neither is the question. What is this code you posted, and why isn't it the code that exhibits the problem? You only have one read, yet you talk of the wrong read getting the data you want.
Update: By the way, IO::Socket::INET greatly simplifies the socket creation.
use IO::Socket::INET qw( ); my $sock = IO::Socket::INET->new( Proto => 'tcp', PeerHost => 'axtcnr:6540', ) or die("Can't connect to axtcnr:6540: $!\n");
($sock is already set to autoflush.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Socket buffer issue
by goosesganders (Initiate) on Apr 01, 2011 at 02:30 UTC | |
by ikegami (Patriarch) on Apr 01, 2011 at 06:48 UTC | |
by goosesganders (Initiate) on Apr 01, 2011 at 15:04 UTC | |
by ikegami (Patriarch) on Apr 01, 2011 at 16:22 UTC | |
by goosesganders (Initiate) on Apr 01, 2011 at 16:38 UTC | |
|