描述
此函数将SocketoptionsOPTNAME的值设置为SOCKET上指定级别的OPTVAL值。您需要导入Socket模块,以获取Tabl中显示的OPTNAME的有效值
语法
以下是此函数的简单语法-
setsockopt SOCKET, LEVEL, OPTNAME, OPTVAL
返回值
如果失败,此函数返回undef;如果成功,则返回1。
OPTNAME 描述 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 中的 setsockopt函数 - 无涯教程网无涯教程网提供描述此函数将SocketoptionsOPTNAME的值设置为SOCKET上指定级别的OPTVAL值。您需要导入...https://www.learnfk.com/perl/perl-setsockopt.html