summaryrefslogtreecommitdiff
path: root/pod/modpods/Socket.pod
blob: 7dfab25b267c5140ed59a77412118d0225b3f767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
=head1 NAME

Socket - load the C socket.h defines

=head1 SYNOPSIS

    use Socket;

    $proto = (getprotobyname('udp'))[2];         
    socket(Socket_Handle, PF_INET, SOCK_DGRAM, $proto); 

=head1 DESCRIPTION

This module is just a translation of the C F<socket.h> file.
Unlike the old mechanism of requiring a translated F<socket.ph>
file, this uses the B<h2xs> program (see the Perl source distribution)
and your native C compiler.  This means that it has a 
far more likely chance of getting the numbers right.

=head1 NOTE

Only C<#define> symbols get translated; you must still correctly
pack up your own arguments to pass to bind(), etc.