class documentation
class UDPPortTestsMixin: (source)
Known subclasses: twisted.internet.test.test_udp.UDPFDServerTestsBuilder
, twisted.internet.test.test_udp.UDPServerTestsBuilder
Tests for IReactorUDP.listenUDP
and IReactorSocket.adoptDatagramPort
.
Method | test_allow |
IListeningPort.setBroadcastAllowed sets broadcast to be allowed on the socket. |
Method | test_connected |
An IPv6 address can be passed as the interface argument to listenUDP . The resulting Port accepts IPv6 datagrams. |
Method | test_connecting |
Connecting to a hostname instead of an IP address will raise an InvalidAddressError . |
Method | test_get |
IListeningPort.getHost returns an IPv4Address giving a dotted-quad of the IPv4 address the port is listening on as well as the port number. |
Method | test_get |
IListeningPort.getHost returns an IPv6Address when listening on an IPv6 interface. |
Method | test |
IReactorUDP.listenUDP returns an object providing IListeningPort . |
Method | test_invalid |
An InvalidAddressError is raised when trying to listen on an address that isn't a valid IPv4 or IPv6 address. |
Method | test_log |
Datagram transports implement ILoggingContext.logPrefix to return a message reflecting the protocol they are running. |
Method | test |
repr() on the listening port object includes the port number. |
Method | test |
str() on the listening port object includes the port number. |
Method | test_write |
Write a sequence of bytes to a DatagramProtocol . |
Method | test_write |
Writing to an IPv6 UDP socket on the loopback interface succeeds. |
Method | test_writing |
Writing to a hostname instead of an IP address will raise an InvalidAddressError . |
Method | test_writing |
Writing to an IPv6 address on an IPv4 socket will raise an InvalidAddressError . |
Method | test_writing |
Writing to an IPv6 address on an IPv4 socket will raise an InvalidAddressError . |
An IPv6 address can be passed as the interface argument to listenUDP
. The resulting Port accepts IPv6 datagrams.
IListeningPort.getHost
returns an IPv4Address
giving a dotted-quad of the IPv4 address the port is listening on as well as the port number.
An InvalidAddressError
is raised when trying to listen on an address that isn't a valid IPv4 or IPv6 address.
Datagram transports implement ILoggingContext.logPrefix
to return a message reflecting the protocol they are running.