class documentation

class _DummyTransport: (source)

Constructor: _DummyTransport(proto)

Implements interfaces: twisted.internet.interfaces.ITransport

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method dataReceived Undocumented
Method getHost Similar to getPeer, but returns an address describing this side of the connection.
Method getPeer Get the remote address of this connection.
Method loseConnection Close my connection, after writing all pending data.
Method write Write some data to the physical connection, in sequence, in a non-blocking fashion.
Method writeSequence Write an iterable of byte strings to the physical connection.
Instance Variable proto Undocumented
Instance Variable _transport Undocumented
def __init__(self, proto: protocol.Protocol): (source)

Undocumented

def dataReceived(self, data: bytes): (source)

Undocumented

def getHost(self) -> IAddress: (source)

Similar to getPeer, but returns an address describing this side of the connection.

Returns
IAddressAn IAddress provider.
def getPeer(self) -> IAddress: (source)

Get the remote address of this connection.

Treat this method with caution. It is the unfortunate result of the CGI and Jabber standards, but should not be considered reliable for the usual host of reasons; port forwarding, proxying, firewalls, IP masquerading, etc.

Returns
IAddressAn IAddress provider.
def loseConnection(self): (source)

Close my connection, after writing all pending data.

Note that if there is a registered producer on a transport it will not be closed until the producer has been unregistered.

def write(self, data: bytes): (source)

Write some data to the physical connection, in sequence, in a non-blocking fashion.

If possible, make sure that it is all written. No data will ever be lost, although (obviously) the connection may be closed before it all gets through.

Parameters
data:bytesThe data to write.
def writeSequence(self, seq: Iterable[bytes]): (source)

Write an iterable of byte strings to the physical connection.

If possible, make sure that all of the data is written to the socket at once, without first copying it all into a single byte string.

Parameters
seq:Iterable[bytes]Undocumented
dataThe data to write.

Undocumented

_transport = (source)

Undocumented