发布时间:2019-09-22 08:06:11编辑:auto阅读(4931)
默认的socket选项不够用的时候,就必须要使用setsockopt来调整。就是使用setsockopt。
首先看一下socket的setsockopt 函数的定义:
Set the value of the given socket option (see the Unix manual pagesetsockopt(2)). The needed symbolic constants are defined in thesocket module (SO_* etc.). The value can be an integer or a string representing a buffer. In the latter case it is up to the caller to ensure that the string contains the proper bits (see the optional built-in modulestruct for a way to encode C structures as strings).
level:选项定义的层次。支持SOL_SOCKET、IPPROTO_TCP、IPPROTO_IP和IPPROTO_IPV6。
optname:需设置的选项。
value:设置选项的值。
上一篇: 怎么查看Anaconda内置的Pytho
下一篇: 在python中对list求和及求积
51031
50421
41027
37890
32360
29253
28135
22974
22933
21261
1135°
1842°
1491°
1426°
1710°
1515°
2175°
3753°
3677°
2589°