Rad has asked for the wisdom of the Perl Monks concerning the following question:
Hi, i wrote this basic perl script to listen for connections, get the data sent on the socket. the problem i have is, I only get some of that data. here is my code-
use IO::Socket; my $sock = new IO::Socket::INET ( LocalHost => '168.159.250.206', LocalPort => '5988', Proto => 'tcp', Listen => 500, Reuse => 1, ); $sock->sockopt(SO_RCVBUF, 1500); die "Could not create socket: $!\n" unless $sock; my $new_sock = $sock->accept(); my $a = ""; while(<$new_sock>) { $new_sock->autoflush(1); print $_; $a = $a.$_; } print "a is $a"; #close($sock);
I took a network trace of my application client and server and i see that on the same port, client sends half the data and then sends the next half of data. what i get is in the below second half of data, i only get "<?xml version="1.0" encoding="UTF-8"?>"
<?xml version="1.0" encoding="UTF-8"?>.<CIM CIMVERSION="2.0" DTDVERSION="2.0"><MESSAGE ID="155178" PROTOCOLVERSION="1.0"><SIMPLEREQ><IMETHODCALL NAME="EnumerateInstances"><LOCALNAMESPACEPATH><NAMESPACE NAME="root"/><NAMESPACE NAME="brocade1"/></LOCALNAMESPACEPATH><IPARAMVALUE NAME="ClassName"><CLASSNAME NAME="Brocade_Fabric"/></IPARAMVALUE><IPARAMVALUE NAME="LocalOnly"><VALUE>true</VALUE></IPARAMVALUE><IPARAMVALUE NAME="DeepInheritance"><VALUE>false</VALUE></IPARAMVALUE><IPARAMVALUE NAME="IncludeQualifiers"><VALUE>false</VALUE></IPARAMVALUE><IPARAMVALUE NAME="IncludeClassOrigin"><VALUE>true</VALUE></IPARAMVALUE></IMETHODCALL></SIMPLEREQ></MESSAGE></CIM>
|
---|