First, congratulations on using Perl as it was meant to be used: in embedded systems, not in an unpleasant CGI script <g>

Second, it's not clear to me what you mean about your difficulty using select:

I thought of using a timeout on the can_read(timeout) call but the STDIN (actually redirected through TCPSERVER from the operator interface device) will reset that value when it wants more action.

You should be able to use select on both your TCP connection and STDIN; when you come out of select, zero or more file handles will be ready to read (or write, or will have exceptions on them, depending on what you were looking for). If zero, you had a timeout.

You may want to look into the Event or POE CPAN modules, both of which allow for simple creation of event-driven systems that can use select as well as timer events.


In reply to Re: Flaky Server (IO::Socket and IO::Select Question) by bikeNomad
in thread Flaky Server (IO::Socket and IO::Select Question) by ginseng

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.