in reply to My server doesnt get all the data sent by the client application
I tweaked a couple things; can't really test except simple localhost things.
#!/usr/bin/perl -w use strict; use IO::Socket; my $sock = IO::Socket::INET->new( #LocalHost => '168.159.250.206', LocalPort => '80', 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 $data = ""; while(my $new_sock = $sock->accept()) { $data = <$new_sock>; #$new_sock->autoflush(1); $| = 1; print $data; $a .= $data; print $a; $| = 0; } print "a is $a"; #close($sock);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: My server doesnt get all the data sent by the client application
by Rad (Novice) on May 13, 2013 at 15:39 UTC | |
|
Re^2: My server doesnt get all the data sent by the client application
by Rad (Novice) on May 13, 2013 at 16:27 UTC | |
by Rad (Novice) on May 13, 2013 at 19:07 UTC | |
by Rad (Novice) on May 14, 2013 at 13:57 UTC |