'Fake L{IReactorSocket.adoptStreamPort}, that logs the call and returns
an L{IListeningPort}.'

def adoptStreamPort(self, fileno, addressFamily, factory):

    if (addressFamily == AF_INET):
        addr = IPv4Address('TCP', '0.0.0.0', 1234)
    elif (addressFamily == AF_INET6):
        addr = IPv6Address('TCP', '::', 1234)
    else:
        raise UnsupportedAddressFamily()
    self.adoptedPorts.append((fileno, addressFamily, factory))
    return _FakePort(addr)
