I was working on something else and gone for an hour and i see that i get all of the 2nd buffer. Not sure, why it took so long to get the data. I changed one thing in the code below
#!/usr/bin/perl -w local($/) = "\012"; use strict; use IO::Socket; my $sock = IO::Socket::INET->new( #LocalHost => '168.159.250.206', LocalPort => '5988', Proto => 'tcp', Listen => SOMAXCONN, #whatever the + + system max is Reuse => 1, ); #$sock->sockopt(SO_RCVBUF, 1500); die $@ unless $sock; # $@ will tell you the error message # my $new_sock = $sock->accept(); # my $new_sock; my $a = ""; my $b = ""; my $data = ""; while(my $new_sock = $sock->accept()) { while(<$new_sock>) {$b = $b.$_; } print $b; #$new_sock->autoflush(1); $| = 1; print $data; $a .= $data; print $a; $| = 0; } print "a is $a"; #close($sock);
In reply to Re^2: My server doesnt get all the data sent by the client application
by Rad
in thread My server doesnt get all the data sent by the client application
by Rad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |