Socket::Class::Const - Constants to Socket::Class
use Socket::Class qw(...);
Socket::Class::Const contains socket related constants which can be exported. Constants can be also exported as scalar variables. The export tag :all exports all constants.
Internet v4 address family
Internet v6 address family
Bluetooth address family
Internet protocol family. Same as AF_INET.
Internet v6 protocol family. Same as AF_INET6.
Bluetooth protocol family. Same as AF_BLUETOOTH.
Connection oriented socket
Packet oriented socket
The ICMP protocol
TCP protocol. Use together with SOCK_STREAM.
UDP protocol. Use together with SOCK_DGRAM.
Stream protocol. Use together with SOCK_STREAM.
Datagram protocol. Use together with SOCK_DGRAM.
Listen queue max size.
Sends OOB data (stream-style socket such as SOCK_STREAM only).
Peeks at the incoming data. The data is copied into the buffer, but is not removed from the input queue.
Specifies that the data should not be subject to routing.
Data completes record.
Return the real length of the packet, even when it was longer then the passed buffer. Only valid for packet sockets.
Return even if it would normally have blocked.
The receive request will complete only when one of the following events occurs:
The buffer supplied by the caller is completely full.
The connection has been closed.
The request has been canceled.
Socket option level
TCP option level
UDP option level
Socket is listening.
The default is FALSE. This option allows transmission of broadcast messages on the socket. Valid only for protocols that support broadcasting (IPX, UDP/IPv4, and others).
Get or set debugging mode.
The default is FALSE. This option indicates that routing is disabled, and outgoing data should be sent on whatever interface the socket and bound to. Valid for message oriented protocols only.
The default is zero (0). This option returns and resets the per socket–based error code.
The default is FALSE. An application or the socket client can request that a TCP/IP service provider enable the use of keep-alive packets on TCP connections by turning on the SO_KEEPALIVE socket option.
The default is 1 (ON). This option controls the action taken when unsent data is queued on a socket and a close() or free() is performed.
The default is FALSE. This option indicates OOB data should be returned in-line with regular data. Valid for connection oriented protocols which support out-of-band data.
This option specifies the total per-socket buffer space reserved for receives.
Receives low watermark.
Receives time-out in milliseconds.
The default is FALSE. Allows the socket to be bound to an address that is already in use.
This option specifies the total per-socket buffer space reserved for sends.
Sends low watermark.
Sends time-out in milliseconds.
Get the type of the socket. (Readonly)
Disables the Nagle algorithm for send coalescing.
Disable receiving on the socket.
Disable sending on the socket.
Disable both sending and receiving on the socket.
Socket is created
Sock is bound
Socket is listening
Socket is connected
Socket is closed
Socket got an error on last send oder receive
The socket address will be used in a call to the bind function.
The canonical name is returned in the first canonname member.
The node parameter passed to the getaddrinfo function must be a numeric string.
Windows only!
The getaddrinfo will resolve only if a global address is configured. The IPv6 and IPv4 loopback address is not considered a valid global address.
Posix only!
Don't use name resolution.
If set, then the numeric form of the hostname is returned. (When not set, this will still happen in case the node's name cannot be looked up.)
If set, then the service address is returned in numeric form, for example by its port number.
If set, return only the hostname part of the FQDN for local hosts.
If set, then a error is returned if the hostname cannot be looked up.
If set, then the service is datagram (UDP) based rather than stream (TCP) based. This is required for the few ports (512-514) that have different services for UDP and TCP.
Christian Mueller, http://www.alien-heads.org/
The Socket::Class::Const module is free software. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'socket–based'. Assuming CP1252
To install Socket::Class, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Socket::Class
CPAN shell
perl -MCPAN -e shell install Socket::Class
For more information on module installation, please visit the detailed CPAN module installation guide.