This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.000
[perl5.git] / ext / Socket / Socket.pm
CommitLineData
a0d0e21e
LW
1package Socket;
2use Carp;
3
4require Exporter;
5require AutoLoader;
6require DynaLoader;
7@ISA = (Exporter, AutoLoader, DynaLoader);
8@EXPORT = qw(
9 AF_802
10 AF_APPLETALK
11 AF_CCITT
12 AF_CHAOS
13 AF_DATAKIT
14 AF_DECnet
15 AF_DLI
16 AF_ECMA
17 AF_GOSIP
18 AF_HYLINK
19 AF_IMPLINK
20 AF_INET
21 AF_LAT
22 AF_MAX
23 AF_NBS
24 AF_NIT
25 AF_NS
26 AF_OSI
27 AF_OSINET
28 AF_PUP
29 AF_SNA
30 AF_UNIX
31 AF_UNSPEC
32 AF_X25
33 MSG_DONTROUTE
34 MSG_MAXIOVLEN
35 MSG_OOB
36 MSG_PEEK
37 PF_802
38 PF_APPLETALK
39 PF_CCITT
40 PF_CHAOS
41 PF_DATAKIT
42 PF_DECnet
43 PF_DLI
44 PF_ECMA
45 PF_GOSIP
46 PF_HYLINK
47 PF_IMPLINK
48 PF_INET
49 PF_LAT
50 PF_MAX
51 PF_NBS
52 PF_NIT
53 PF_NS
54 PF_OSI
55 PF_OSINET
56 PF_PUP
57 PF_SNA
58 PF_UNIX
59 PF_UNSPEC
60 PF_X25
61 SOCK_DGRAM
62 SOCK_RAW
63 SOCK_RDM
64 SOCK_SEQPACKET
65 SOCK_STREAM
66 SOL_SOCKET
67 SOMAXCONN
68 SO_ACCEPTCONN
69 SO_BROADCAST
70 SO_DEBUG
71 SO_DONTLINGER
72 SO_DONTROUTE
73 SO_ERROR
74 SO_KEEPALIVE
75 SO_LINGER
76 SO_OOBINLINE
77 SO_RCVBUF
78 SO_RCVLOWAT
79 SO_RCVTIMEO
80 SO_REUSEADDR
81 SO_SNDBUF
82 SO_SNDLOWAT
83 SO_SNDTIMEO
84 SO_TYPE
85 SO_USELOOPBACK
86);
87
88sub AUTOLOAD {
89 if (@_ > 1) {
90 $AutoLoader::AUTOLOAD = $AUTOLOAD;
91 goto &AutoLoader::AUTOLOAD;
92 }
93 local($constname);
94 ($constname = $AUTOLOAD) =~ s/.*:://;
95 $val = constant($constname, @_ ? $_[0] : 0);
96 if ($! != 0) {
97 if ($! =~ /Invalid/) {
98 $AutoLoader::AUTOLOAD = $AUTOLOAD;
99 goto &AutoLoader::AUTOLOAD;
100 }
101 else {
102 ($pack,$file,$line) = caller;
103 croak "Your vendor has not defined Socket macro $constname, used";
104 }
105 }
106 eval "sub $AUTOLOAD { $val }";
107 goto &$AUTOLOAD;
108}
109
110bootstrap Socket;
111
112# Preloaded methods go here. Autoload methods go after __END__, and are
113# processed by the autosplit program.
114
1151;
116__END__