Implements interfaces: twisted.internet.interfaces.IUDPTransport

This IUDPTransport implementation enforces the usual connection rules and captures sent traffic in a list for later inspection.

Method __init__ Undocumented
Method getHost Return the address which this transport is pretending to be bound to.
Method connect Connect this transport to the given address.
Method write Send the given datagram.
Method stopListening Shut down this transport.
Method setBroadcastAllowed Dummy implementation to satisfy IUDPTransport.
Method getBroadcastAllowed Dummy implementation to satisfy IUDPTransport.
Instance Variable _host The host address to which this transport is bound.
Instance Variable _protocol The protocol connected to this transport.
Instance Variable _sentPackets A list of two-tuples of the datagrams passed to write and the addresses to which they are destined.
Instance Variable _connectedTo None if this transport is unconnected, otherwise an address to which all traffic is supposedly sent.
Instance Variable _maxPacketSize An int giving the maximum length of a datagram which will be successfully handled by write.
_host =
The host address to which this transport is bound.
_protocol =
The protocol connected to this transport.
_sentPackets =
A list of two-tuples of the datagrams passed to write and the addresses to which they are destined.
_connectedTo =
None if this transport is unconnected, otherwise an address to which all traffic is supposedly sent.
_maxPacketSize =
An int giving the maximum length of a datagram which will be successfully handled by write.
def __init__(self, host, protocol, maxPacketSize):
Undocumented
def getHost(self):

Return the address which this transport is pretending to be bound to.

def connect(self, host, port):

Connect this transport to the given address.

def write(self, datagram, addr=None):

Send the given datagram.

def stopListening(self):

Shut down this transport.

def setBroadcastAllowed(self, enabled):

Dummy implementation to satisfy IUDPTransport.

def getBroadcastAllowed(self):

Dummy implementation to satisfy IUDPTransport.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.