Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: IO::Socket connect fails to block

by mr.nick (Chaplain)
on Jan 18, 2012 at 13:42 UTC ( [id://948549]=note: print w/replies, xml ) Need Help??


in reply to Re^2: IO::Socket connect fails to block
in thread IO::Socket connect fails to block

Just to comment and provide some closure to this, in case anyone looks, recall that my seeming issue was this:

1. Client connects to server and does some i/o
2. 2nd Client attempts to connect to server and do some i/o. It spews a few lines of text at the socket and waits.
3. Server finishes with client #1, accepts() client #2
4. Not all the text send over in #2 is there.

Well, this is under Windows (Cygwin to exact) and I found the issue... during the negotiation between client and server multiple debugging output is done. In the DebugMsg() function is the following:

    chomp(my $d = `date "+%Y-%m-%d-%H.%M.%S"`);

That is the culprit. Shelling out and running date is somehow flushing/truncating the sockets. A simple change from that to

        my $d = strftime("%Y-%m-%d-%H:%M:%S",localtime(time));

Completely fixed my issue.

Pain in the ass, eh?

mr.nick ...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://948549]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-19 07:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found