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 ...


In reply to Re^3: IO::Socket connect fails to block by mr.nick
in thread IO::Socket connect fails to block by mr.nick

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.