What it is:

       modules Net::Gen, Net::Inet, Net::TCP, Net::UDP, and Net::UNIX.
       Net::Gen is not a good name, I know that, but what's in it
       really belongs in Socket, I think.  In any case, I'm open to
       votes for a better name.

What's different from other offerings:

       Layering keeps PF_INET things in Inet, and only socket-generic
       stuff is in Gen.

       Friendly {g,s}etsockopt.

       A TIESCALAR interface for really simple socket communications.

       Properly handles connects to hosts with multiple addresses as
       long as gethostbyname() returns more than one address.  (See RFC
       1123.)

What's still missing:

       Support for non-blocking sockets is untested at best.  The
       select, fhvec, ioctl, and fcntl methods are crude hacks.

       A proper set of regression & verification tests.

       Proper handling of timeout options.  Timed connect() seems
       to be working now, but there's no direct support for, say,
       sending as much of a block of data as possible in a given
       timeout period.

       Configuration testing to get the include files right on more
       systems, and to manage to find the constants which at least some
       Linux systems have as enums rather than as #defines.  (I think I
       have this one covered now, but it isn't proved yet.)

       Better support (besides the plethora of protocol constants) for
       raw socket communications (required for the ICMP values to be
       useful).

       Probably several other things I won't have missed (yet).


The .pm files themselves are pod-ified (somewhat), with a catalogue of
the methods.

I'm not a technical writer, nor do I usually play one on the net.
The documentation could still use a lot of work, I'm sure.

Making it all work requires perl 5.004 or later.

A simple test script:

       #!/usr/bin/perl

       use Net::TCP;

       $f = new Net::TCP 0, 'finger';
       die "Can't establish finger socket: $!\n" unless $f;

       put $f "-s\015\012";
       $f->shutdown(1);
       print $line while defined($line = getline $f);
       undef $f;

       die "Can't tie to finger socket: $!\n" unless
               tie $f,'Net::TCP',0,'finger';

       $f = "-s\n";
       print $line while (defined $line=$f);
       untie $f;

Should be the same (on most BSD-ish systems, anyway) as
       finger ; finger
to the shell.


Anyway, bug reports & feature requests to me ([email protected]).

In particular, however, if you have compilation difficulties, check
the Makefile.PL file again, especially near "my @hfiles".  The list
of required system include files is almost entirely tester-contributed.
If it doesn't build (yet) on your system/configuration/version, see if
you can figure out why, following those guidelines.  Future users will
thank you, too.

Finally, the next release point of this code will be making major changes
to the internal implementation.  Be warned.  If you're sticking to the
documented interfaces the way you should be doing, it shouldn't matter
to you.

# Copyright 1995,1996,1997 Spider Boardman.
# All rights reserved.
#
# Automatic licensing for this software is available.  This software
# can be copied and used under the terms of the GNU Public License,
# version 1 or (at your option) any later version, or under the
# terms of the Artistic license.  Both of these can be found with
# the Perl distribution, which this software is intended to augment.
#
# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.