twisted.internet.test.test_unix.ReceiveFileDescriptor(ConnectableProtocol)
class documentationtwisted.internet.test.test_unix
(View In Hierarchy)
Implements interfaces: twisted.internet.interfaces.IFileDescriptorReceiver
ReceiveFileDescriptor
provides an API for waiting for file descriptors to be received.
Instance Variable | reason | The reason the connection was lost, after connectionLost is
called. |
Instance Variable | waiting | A Deferred
which fires with a file descriptor once one is received, or with a failure
if the connection is lost with no descriptor arriving. |
Method | waitForDescriptor | Return a Deferred which
will fire with the next file descriptor received, or with a failure if the
connection is or has already been lost. |
Method | fileDescriptorReceived | Fire the waiting Deferred, initialized by
waitForDescriptor , with the file descriptor just received. |
Method | dataReceived | No summary |
Method | connectionLost | Fail the waiting Deferred, initialized by
waitForDescriptor , if there is one. |
Inherited from ConnectableProtocol:
Instance Variable | reactor | The reactor used in this test. |
Instance Variable | disconnectReason | The Failure
passed to connectionLost . |
Instance Variable | _done | A Deferred
which will be fired when the connection is lost. |
Method | _setAttributes | Set attributes on the protocol that are known only externally; this will
be called by runProtocolsWithReactor
when this protocol is instantiated. |
Inherited from Protocol (via ConnectableProtocol):
Method | logPrefix | Return a prefix matching the class name, to identify log messages related to this protocol instance. |
Inherited from BaseProtocol (via ConnectableProtocol, Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Method | connectionMade | Called when a connection is made. |
Deferred
which fires with a file descriptor once one is received, or with a failure
if the connection is lost with no descriptor arriving.
Return a Deferred
which
will fire with the next file descriptor received, or with a failure if the
connection is or has already been lost.
Fire the waiting Deferred, initialized by
waitForDescriptor
, with the file descriptor just received.
Fail the waiting Deferred, if it has not already been fired by
fileDescriptorReceived
. The bytes sent along with a file
descriptor are guaranteed to be delivered to the protocol's
dataReceived
method only after the file descriptor has been
delivered to the protocol's fileDescriptorReceived
.