I'm trying to write a cool Games::Go::NNGS module. Well, I'm not sure what it'll be called, but that seems reasonable. I usually wait ot decide on a name until I have enough module to bother.

Heh. Anyway. I'll need to telnet in, and read/write from the socket. I'd prefer to have the module call function callbacks for events it detects.

It seems like a reasonably good place to use threads, but not everyone has perl compiled with threads. So I was looking at IPC::SysV. I remember reading that's flaky?

Is there a better solution to my telnet and let control pass back to the caller problem?

I found this mud client which sounded helpful, but my my $o = new Games::Go::NNGS would never return...

And so, I'm asking about IPC::SysV. Well, for an alternative. Am I missing a cool Net::Telnet::Callbacks or something? Should I use sockets or something? Should I just force people to recompile perl in order to use a threaded module?

I don't like that last one because of my Sendmail::Milter troubles... Recompiling perl on a P60 sucks.

update (broquaint): title change (was NNGS)


In reply to non-blocking TCP/IP client object using callbacks by jettero

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.