I have written a test suite however now that i am trying to multithread the windows client (as it is used to establish multiple connections to test servers at the same time) all my data communications are failing to get back to the server. I think i have narrowed it down to the autoflush setting, any ideas? (it worked before multi-threading).

Client (send):
sub sendxml { #THREAD while (my $xml = $g_sendxmlQueue->dequeue) { my $xs = new XML::Simple(keeproot => 1, forcearray => 1); my $ref = $xs->XMLin($xml); #Send results to controller #my $ref = $_[0]; my $mhost = $ref->{job}->[0]->{controllerip}; my $mPort = 40000; dprint(2,"sendxml: sending xml data to host [$mhost:$mPort +]"); my $EC_SOCK = new IO::Socket::INET(PeerAddr => $mhost, PeerPort => $mPort, Proto => 'tcp'); if ($EC_SOCK) { dprint(1,"Network connection established to host [ +$mhost]"); $EC_SOCK->autoflush(1); unless ($ES_SOCK) { dprint(1,"autoflush setting killed connect +ion"); } my $xml = $xs->XMLout($ref); my @lines = split /\n/, $xml; foreach my $line (@lines) { print $EC_SOCK $line; } } if($ref->{job}->[0]->{jname} ne "discovery" && $re +f->{job}->[0]->{jname} ne "isalive") { print("Sent:\n-----\n$xml\n"); } close ($EC_SOCK); } else { print STDOUT "ERROR: Unable to connect to controll +er."; dprint(1,"ERROR: Unable to connect to controller." +); } } }

In reply to Re: IO::Socket::INET and LTSP read-only filesystem by glenn
in thread IO::Socket::INET and LTSP read-only filesystem by kwaping

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.