perl5.001 patch.1f
[p5sagit/p5-mst-13.2.git] / pod / modpods / Socket.pod
1 =head1 NAME
2
3 Socket - load the C socket.h defines
4
5 =head1 SYNOPSIS
6
7     use Socket;
8
9     $proto = (getprotobyname('udp'))[2];         
10     socket(Socket_Handle, PF_INET, SOCK_DGRAM, $proto); 
11
12 =head1 DESCRIPTION
13
14 This module is just a translation of the C F<socket.h> file.
15 Unlike the old mechanism of requiring a translated F<socket.ph>
16 file, this uses the B<h2xs> program (see the Perl source distribution)
17 and your native C compiler.  This means that it has a 
18 far more likely chance of getting the numbers right.
19
20 =head1 NOTE
21
22 Only C<#define> symbols get translated; you must still correctly
23 pack up your own arguments to pass to bind(), etc.