socket.socket.setsockopt()

socket.setsockopt(level, optname, value)

Set the value of the given socket option (see the Unix manual page setsockopt(2)). The needed symbolic constants are defined in the socket module (SO_* etc.). The value can be an integer or a bytes-like object representing a buffer. In the latter case it is up to the caller to ensure that the bytestring contains the proper bits (see the optional built-in module struct for a way to encode C structures as bytestrings).

Changed in version 3.5: Writable bytes-like object is now accepted.

doc_python
2016-10-07 17:42:25
Comments
Leave a Comment

Please login to continue.