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>


In reply to My server doesnt get all the data sent by the client application by Rad

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.