twisted.internet.test.test_udp.UDPPortTestsMixin(object) class documentationtwisted.internet.test.test_udp
(View In Hierarchy)
Known subclasses: twisted.internet.test.test_udp.UDPFDServerTestsBuilder, twisted.internet.test.test_udp.UDPServerTestsBuilder
Tests for IReactorUDP.listenUDP
and IReactorSocket.adoptDatagramPort.
| Method | test_interface | IReactorUDP.listenUDPreturns an object providingIListeningPort. | 
| Method | test_getHost | IListeningPort.getHostreturns anIPv4Addressgiving a dotted-quad of the IPv4 address the port is listening on as well 
as the port number. | 
| Method | test_getHostIPv6 | IListeningPort.getHostreturns anIPv6Addresswhen listening on an IPv6 interface. | 
| Method | test_invalidInterface | An InvalidAddressErroris raised when trying to listen on an address that isn't a valid IPv4 or 
IPv6 address. | 
| Method | test_logPrefix | Datagram transports implement ILoggingContext.logPrefixto return a message reflecting the protocol they are running. | 
| Method | test_writeSequence | Write a sequence of bytesto aDatagramProtocol. | 
| Method | test_str | str()on the listening port object includes the port 
number. | 
| Method | test_repr | repr()on the listening port object includes the port 
number. | 
| Method | test_writeToIPv6Interface | Writing to an IPv6 UDP socket on the loopback interface succeeds. | 
| Method | test_connectedWriteToIPv6Interface | An IPv6 address can be passed as the interfaceargument tolistenUDP. The resulting Port accepts IPv6 datagrams. | 
| Method | test_writingToHostnameRaisesInvalidAddressError | Writing to a hostname instead of an IP address will raise an InvalidAddressError. | 
| Method | test_writingToIPv6OnIPv4RaisesInvalidAddressError | Writing to an IPv6 address on an IPv4 socket will raise an InvalidAddressError. | 
| Method | test_writingToIPv4OnIPv6RaisesInvalidAddressError | Writing to an IPv6 address on an IPv4 socket will raise an InvalidAddressError. | 
| Method | test_connectingToHostnameRaisesInvalidAddressError | Connecting to a hostname instead of an IP address will raise an InvalidAddressError. | 
| Method | test_allowBroadcast | IListeningPort.setBroadcastAllowedsets broadcast to be 
allowed on the socket. | 
IListeningPort.getHost
returns an IPv4Address
giving a dotted-quad of the IPv4 address the port is listening on as well 
as the port number.
IListeningPort.getHost
returns an IPv6Address
when listening on an IPv6 interface.
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.
Writing to an IPv6 UDP socket on the loopback interface succeeds.
An IPv6 address can be passed as the interface argument to 
listenUDP. The resulting Port accepts IPv6 datagrams.
Writing to a hostname instead of an IP address will raise an InvalidAddressError.
Writing to an IPv6 address on an IPv4 socket will raise an InvalidAddressError.
Writing to an IPv6 address on an IPv4 socket will raise an InvalidAddressError.
Connecting to a hostname instead of an IP address will raise an InvalidAddressError.