Apologies for the late reply... was the family driver over the Easter weekend.

  1. Anything to back up your claim? Anything to reproduce that bug?
    • Well I tried writing out a string on the 'hot' server filehandle prior to attempting the read and it would get to the client just fine. The same write would be buffered on the server side upon printing the string after the read (via <>). The moment I would KILL the client, the server would spew out the buffer contents in the log (presumably upon receiving a TCP RST from the client).
  2. Any code at all relating to the bug?
    • I wanted to keep the post concise. It might end up being a long winded post and hence I only posted portions of the code that I though relevant.
  3. Any change you're mixing select with read or readline (aka <>)?
    • I assume chance. Good point but no. I am doing <CLIENT> whenever I am trying to read data from the client. (And that being said, I am able to get and process the data. It's just that when I get my reply ready and do a print CLIENT blah . "\n";, the data is buffered.
  4. By the way, your code would be much clearer using IO::Socket::INET.
    • Will check it out. Also, will re-plumb my code appropriately. That being said, I am still not clear as to how I could 'unbuffer' the filehandle(s). From what I know, there is no way in perl to unbuffer a filehandle, it can either be line buffered or block buffered.

Thank you Sir for your time. Much appreciated.


In reply to Re^2: Buffering & Network Programming Reads and Writes!! by MarkovChain
in thread Buffering & Network Programming Reads and Writes!! by MarkovChain

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.