class documentation

class twisted.protocols.amp._DescriptorExchanger: (source)

Known subclasses: twisted.protocols.amp.BinaryBoxProtocol

Implements interfaces: twisted.internet.interfaces.IFileDescriptorReceiver

View In Hierarchy

_DescriptorExchanger is a mixin for BinaryBoxProtocol which adds support for receiving file descriptors, a feature offered by IUNIXTransport.

Method __init__ Undocumented
Method fileDescriptorReceived Collect received file descriptors to be claimed later by Descriptor.
Instance Variable _descriptors Temporary storage for all file descriptors received. Values in this dictionary are the file descriptors (as integers). Keys in this dictionary are ordinals giving the order in which each descriptor was received. The ordering information is used to allow Descriptor to determine which is the correct descriptor for any particular usage of that argument type.
Instance Variable _sendingDescriptorCounter A no-argument callable which returns the ordinals, starting from 0. This is used to construct values for _sendFileDescriptor.
Instance Variable _receivingDescriptorCounter A no-argument callable which returns the ordinals, starting from 0. This is used to construct values for fileDescriptorReceived.
Instance Variable _getDescriptor Undocumented
Method _sendFileDescriptor Assign and return the next ordinal to the given descriptor after sending the descriptor over this protocol's transport.
_descriptors = (source)
Temporary storage for all file descriptors received. Values in this dictionary are the file descriptors (as integers). Keys in this dictionary are ordinals giving the order in which each descriptor was received. The ordering information is used to allow Descriptor to determine which is the correct descriptor for any particular usage of that argument type.
(type: dict)
_sendingDescriptorCounter = (source)
A no-argument callable which returns the ordinals, starting from 0. This is used to construct values for _sendFileDescriptor.
_receivingDescriptorCounter = (source)
A no-argument callable which returns the ordinals, starting from 0. This is used to construct values for fileDescriptorReceived.
def __init__(self): (source)

Undocumented

_getDescriptor = (source)

Undocumented

def _sendFileDescriptor(self, descriptor): (source)

Assign and return the next ordinal to the given descriptor after sending the descriptor over this protocol's transport.

def fileDescriptorReceived(self, descriptor): (source)

Collect received file descriptors to be claimed later by Descriptor.

ParametersdescriptorThe received file descriptor. (type: int)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.