perl5.001 patch.1f
[p5sagit/p5-mst-13.2.git] / pod / modpods / Socket.pod
CommitLineData
a0d0e21e 1=head1 NAME
2
3Socket - 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
14This module is just a translation of the C F<socket.h> file.
15Unlike the old mechanism of requiring a translated F<socket.ph>
16file, this uses the B<h2xs> program (see the Perl source distribution)
17and your native C compiler. This means that it has a
18far more likely chance of getting the numbers right.
19
20=head1 NOTE
21
22Only C<#define> symbols get translated; you must still correctly
23pack up your own arguments to pass to bind(), etc.