2006-09-24 18:03:56| 分类: lang_python | 标签: |举报 |字号大中小 订阅
Option | Meaning | Expected Value |
SO_BINDTODEVICE | Causes the socket to be valid on a particular network interface (network card) only. May not be portable. | A string giving the device name, or an empty string to return to default behavior |
SO_BROADCAST | Permits the transmission and reception of packets to the broadcast address. Only valid for UDP. | Boolean integer |
SO_DONTROUTE | Prohibits outgoing packets from crossing any router or gateway. This is most frequently useful for UDP communication on an Ethernet LAN as a security measure. It prevents data from leaving the local network, no matter what IP address is used for the destination. | Boolean integer |
SO_KEEPALIVE | Enables the transmission of keep-alive packets for TCP connections. These packets help both endpoints of the connection verify that the connection remains open even when no data is passing through it. | Boolean integer |
SO_OOBINLINE | Causes incoming out-of-band data to be treated as if it were normal data; that is, it will be receivable via a standard call to recv(). | Boolean integer |
SO_REUSEADDR | The port number used by the local endpoint of this socket becomes immediately reusable after the socket is closed. Normal behavior prevents it from being reused for a system-defined amount of time. | Boolean integer |
SO_TYPE | Retrieves the socket type (such as SOCKSTREAM or SOCK_DGRAM). getsockopt() only. | Integer |
评论