Known subclasses: twisted.internet.unix.Client, twisted.internet.unix.Server

Implements interfaces: twisted.internet.interfaces.IUNIXTransport

Mixin for stream-oriented UNIX transports which uses sendmsg and recvmsg to offer additional functionality, such as copying file descriptors into other processes.

Method __init__ Undocumented
Method sendFileDescriptor Queue the given file descriptor to be sent and start trying to send it.
Method writeSomeData Send as much of data as possible. Also send any pending file descriptors.
Method doRead Calls IFileDescriptorReceiver.fileDescriptorReceived and IProtocol.dataReceived with all available data.
Instance Variable _writeSomeDataBase The class which provides the basic implementation of writeSomeData. Ultimately this should be a subclass of twisted.internet.abstract.FileDescriptor. Subclasses which mix in _SendmsgMixin must define this.
Instance Variable _sendmsgQueue A list of int holding file descriptors which are currently buffered before being sent.
Instance Variable _fileDescriptorBufferSize An int giving the maximum number of file descriptors to accept and queue for sending before pausing the registered producer, if there is one.
Method _isSendBufferFull Determine whether the user-space send buffer for this transport is full or not.
_writeSomeDataBase =
The class which provides the basic implementation of writeSomeData. Ultimately this should be a subclass of twisted.internet.abstract.FileDescriptor. Subclasses which mix in _SendmsgMixin must define this.
_sendmsgQueue =
A list of int holding file descriptors which are currently buffered before being sent.
_fileDescriptorBufferSize =
An int giving the maximum number of file descriptors to accept and queue for sending before pausing the registered producer, if there is one.
def __init__(self): (source)
def _isSendBufferFull(self): (source)

Determine whether the user-space send buffer for this transport is full or not.

This extends the base determination by adding consideration of how many file descriptors need to be sent using sendmsg.sendmsg. When there are more than self._fileDescriptorBufferSize, the buffer is considered full.

ReturnsTrue if it is full, False otherwise.
def sendFileDescriptor(self, fileno): (source)

Queue the given file descriptor to be sent and start trying to send it.

def writeSomeData(self, data): (source)

Send as much of data as possible. Also send any pending file descriptors.

def doRead(self): (source)

Calls IFileDescriptorReceiver.fileDescriptorReceived and IProtocol.dataReceived with all available data.

This reads up to self.bufferSize bytes of data from its socket, then dispatches the data to protocol callbacks to be handled. If the connection is not lost through an error in the underlying recvmsg(), this function will return the result of the dataReceived call.

API Documentation for Twisted, generated by pydoctor at 2015-09-04 15:29:41.