class TCPPortTestsMixin: (source)
Known subclasses: twisted.internet.test.test_tcp.TCPFDPortTestsBuilder
, twisted.internet.test.test_tcp.TCPPortTestsBuilder
Tests for IReactorTCP.listenTCP
Method | get |
Get the expected connection lost message for a TCP port. |
Method | get |
Get the message expected to be logged when a TCP port starts listening. |
Method | test_build |
When a connection is accepted over IPv4, an IPv4Address is passed to the factory's buildProtocol method giving the peer's address. |
Method | test_build |
When a connection is accepted to an IPv6 address, an IPv6Address is passed to the factory's buildProtocol method giving the peer's address. |
Method | test_build |
When a connection is accepted to a link-local IPv6 address, an IPv6Address is passed to the factory's buildProtocol method giving the peer's address, including a scope identifier. |
Method | test_port |
When no interface is passed to IReactorTCP.listenTCP , the returned listening port listens on an IPv4 address. |
Method | test_port |
When listening on an IPv6 address, IListeningPort.getHost returns an IPv6Address with host and port attributes reflecting the address the port is bound to. |
Method | test_port |
When a link-local IPv6 address including a scope identifier is passed as the interface argument to IReactorTCP.listenTCP , the resulting IListeningPort reports its address as an IPv6Address with a host value that includes the scope identifier. |
Method | test_server |
When a connection is accepted over IPv4, the server ITransport.getHost method returns an IPv4Address giving the address on which the server accepted the connection. |
Method | test_server |
When a connection is accepted over IPv6, the server ITransport.getHost method returns an IPv6Address giving the address on which the server accepted the connection. |
Method | test_server |
When a connection is accepted over IPv6, the server ITransport.getHost method returns an IPv6Address giving the address on which the server accepted the connection, including the scope identifier. |
Method | test_server |
When a connection is accepted over IPv4, the server ITransport.getPeer method returns an IPv4Address giving the address of the remote end of the connection. |
Method | test_server |
When a connection is accepted over IPv6, the server ITransport.getPeer method returns an IPv6Address giving the address on the remote end of the connection. |
Method | test_server |
When a connection is accepted over IPv6, the server ITransport.getPeer method returns an IPv6Address giving the address on the remote end of the connection, including the scope identifier. |
Class Variable | required |
Undocumented |
Method | _build |
Connect client to a server listening on interface started with IReactorTCP.listenTCP and return the address passed to the factory's buildProtocol method. |
Method | _server |
Connect client to a server listening on interface started with IReactorTCP.listenTCP and return the address returned by one of the server transport's address lookup methods, getHost or getPeer. |
When a connection is accepted over IPv4, an IPv4Address
is passed to the factory's buildProtocol method giving the peer's address.
When a connection is accepted to an IPv6 address, an IPv6Address
is passed to the factory's buildProtocol method giving the peer's address.
When a connection is accepted to a link-local IPv6 address, an IPv6Address
is passed to the factory's buildProtocol method giving the peer's address, including a scope identifier.
When no interface is passed to IReactorTCP.listenTCP
, the returned listening port listens on an IPv4 address.
When listening on an IPv6 address, IListeningPort.getHost
returns an IPv6Address
with host and port attributes reflecting the address the port is bound to.
When a link-local IPv6 address including a scope identifier is passed as the interface argument to IReactorTCP.listenTCP
, the resulting IListeningPort
reports its address as an IPv6Address
with a host value that includes the scope identifier.
When a connection is accepted over IPv4, the server ITransport.getHost
method returns an IPv4Address
giving the address on which the server accepted the connection.
When a connection is accepted over IPv6, the server ITransport.getHost
method returns an IPv6Address
giving the address on which the server accepted the connection.
When a connection is accepted over IPv6, the server ITransport.getHost
method returns an IPv6Address
giving the address on which the server accepted the connection, including the scope identifier.
When a connection is accepted over IPv4, the server ITransport.getPeer
method returns an IPv4Address
giving the address of the remote end of the connection.
When a connection is accepted over IPv6, the server ITransport.getPeer
method returns an IPv6Address
giving the address on the remote end of the connection.
When a connection is accepted over IPv6, the server ITransport.getPeer
method returns an IPv6Address
giving the address on the remote end of the connection, including the scope identifier.
Connect client to a server listening on interface started with IReactorTCP.listenTCP
and return the address passed to the factory's buildProtocol method.
Parameters | |
client | A SOCK_STREAM socket.socket created with an address family such that it will be able to connect to a server listening on interface. |
interface | A str giving an address for a server to listen on. This should almost certainly be the loopback address for some address family supported by IReactorTCP.listenTCP . |
Returns | |
Whatever object, probably an IAddress provider, is passed to a server factory's buildProtocol method when client establishes a connection. |
Connect client to a server listening on interface started with IReactorTCP.listenTCP
and return the address returned by one of the server transport's address lookup methods, getHost or getPeer.
Parameters | |
client | A SOCK_STREAM socket.socket created with an address family such that it will be able to connect to a server listening on interface. |
interface | A str giving an address for a server to listen on. This should almost certainly be the loopback address for some address family supported by IReactorTCP.listenTCP . |
which | A str equal to either "getHost" or "getPeer" determining which address will be returned. |
Returns | |
Whatever object, probably an IAddress provider, is returned from the method indicated by which. |