First, I'd recommend a good TCP/IP book. I learned from the Comer/Stevens series. I would recommend you pick up one of the following: Internetworking with TCP/IP, Volume III, BSD version, Windows version, linux/POSIX version. http://www.bookpool.com is a good place to get technical books at a discount. Somebody else here might have some other book recommendations but I've always heard good reviews about this series.

As far as handling connections goes, you have the following choice:

Which way is best is for you to decide. What works best on one platform may not work well at all on another. Try to separate your network interface from the rest of your code so that you can try implementing it in different ways.

As a disclaimer, I've written many network servers but usually in C/C++. I've never tried to do one in perl.

--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';

In reply to Re: Sockets: TMTOWTDI (BWWIB)? by pfaut
in thread Sockets: TMTOWTDI (BWWIB)? by Ionizor

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.