sendmsg(2) and recvmsg(2) support for Python.

Function sendmsg Send a message on a socket.
Function recvmsg Receive a message on a socket.
Function getSocketFamily Return the family of the given socket.
def sendmsg(socket, data, ancillary=[], flags=0): (source)

Send a message on a socket.

ParameterssocketThe socket to send the message on. (type: socket.socket)
dataBytes to write to the socket. (type: bytes)
ancillaryExtra data to send over the socket outside of the normal datagram or stream mechanism. By default no ancillary data is sent. (type: list of tuple of int, int, and bytes.)
flagsFlags to affect how the message is sent. See the MSG_ constants in the sendmsg(2) manual page. By default no flags are set. (type: int)
ReturnsThe return value of the underlying syscall, if it succeeds.
def recvmsg(socket, maxSize=8192, cmsgSize=4096, flags=0): (source)

Receive a message on a socket.

ParameterssocketThe socket to receive the message on. (type: socket.socket)
maxSizeThe maximum number of bytes to receive from the socket using the datagram or stream mechanism. The default maximum is 8192. (type: int)
cmsgSizeThe maximum number of bytes to receive from the socket outside of the normal datagram or stream mechanism. The default maximum is 4096. (type: int)
flagsFlags to affect how the message is sent. See the MSG_ constants in the sendmsg(2) manual page. By default no flags are set. (type: int)
ReturnsA named 3-tuple of the bytes received using the datagram/stream mechanism, a list of tuples giving ancillary received data, and flags as an int describing the data received.
def getSocketFamily(socket): (source)

Return the family of the given socket.

ParameterssocketThe socket to get the family of. (type: socket.socket)
Returns (type: int)
API Documentation for Twisted, generated by pydoctor at 2018-04-29 21:01:12.