in reply to IO::Socket::INET and LTSP read-only filesystem

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." +); } } }

Replies are listed 'Best First'.
Re^2: IO::Socket::INET and LTSP read-only filesystem
by glenn (Scribe) on Oct 18, 2008 at 19:09 UTC
    i fixed it, either the issue was too many xml elements in a tag <job sessionid="" option100=""> or some new options (that i now delete just before sending) which contained '\\' (<job sysdirve="C:" workdir="c:\\temp\\work\\">)