- Perl Basics
- Perl - Home
- Perl - Introduction
- Perl - Environment
- Perl - Syntax Overview
- Perl - Data Types
- Perl - Variables
- Perl - Scalars
- Perl - Arrays
- Perl - Hashes
- Perl - IF...ELSE
- Perl - Loops
- Perl - Operators
- Perl - Date & Time
- Perl - Subroutines
- Perl - References
- Perl - Formats
- Perl - File I/O
- Perl - Directories
- Perl - Error Handling
- Perl - Special Variables
- Perl - Coding Standard
- Perl - Regular Expressions
- Perl - Sending Email
- Perl Advanced
- Perl - Socket Programming
- Perl - Object Oriented
- Perl - Database Access
- Perl - CGI Programming
- Perl - Packages & Modules
- Perl - Process Management
- Perl - Embedded Documentation
- Perl - Functions References
- Perl Useful Resources
- Perl - Questions and Answers
- Perl - Quick Guide
- Perl - Useful Resources
- Perl - Discussion
Perl setsockopt Function
Description
This function Sets the socket option OPTNAME with a value of OPTVAL on SOCKET at the specified LEVEL. You will need to import the Socket module for the valid values for OPTNAME shown below in Tabl
Syntax
Following is the simple syntax for this function −
setsockopt SOCKET, LEVEL, OPTNAME, OPTVAL
Return Value
This function returns undef on failure and 1 on success.
OPTNAME Description SO_DEBUG Enable/disable recording of debugging information. SO_REUSEADDR Enable/disable local address reuse. SO_KEEPALIVE Enable/disable keep connections alive. SO_DONTROUTE Enable/disable routing bypass for outgoing messages. SO_LINGER Linger on close if data is present. SO_BROADCAST Enable/disable permission to transmit broadcast messages. SO_OOBINLINE Enable/disable reception of out-of-band data in band. SO_SNDBUF Set buffer size for output. SO_RCVBUF Set buffer size for input. SO_TYPE Get the type of the socket (get only). SO_ERROR Get and clear error on the socket (get only).
perl_function_references.htm
Advertisements
To Continue Learning Please Login
Login with Google