diff options
Diffstat (limited to 'pod/modpods/Socket.pod')
-rw-r--r-- | pod/modpods/Socket.pod | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pod/modpods/Socket.pod b/pod/modpods/Socket.pod new file mode 100644 index 0000000000..7dfab25b26 --- /dev/null +++ b/pod/modpods/Socket.pod @@ -0,0 +1,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. |