t.i.i.IUDPTransport(Interface) : interface documentation

Part of twisted.internet.interfaces View Source View In Hierarchy

Known implementations: twisted.internet.iocpreactor.udp.Port, twisted.internet.udp.Port

Transport for UDP DatagramProtocols.
Method write Write packet to given address.
Method connect Connect the transport to an address.
Method getHost Returns IPv4Address.
Method stopListening Stop listening on this port.
def write(packet, addr=None): (source)
Write packet to given address.
Parametersaddra tuple of (ip, port). For connected transports must be the address the transport is connected to, or None. In non-connected mode this is mandatory.
Raisestwisted.internet.error.MessageLengthErrorpacket was too long.
def connect(host, port): (source)

Connect the transport to an address.

This changes it to connected mode. Datagrams can only be sent to this address, and will only be received from this address. In addition the protocol's connectionRefused method might get called if destination is not receiving datagrams.
Parametershostan IP address, not a domain name ('', not 'localhost')
portport to connect to.
def getHost(): (source)
Returns IPv4Address.
def stopListening(): (source)

Stop listening on this port.

If it does not complete immediately, will return Deferred that fires upon completion.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:12:41.