def listen(self, factory):
        if self._used:
            return defer.fail(error.AlreadyListened())
        self._used = True

        try:
            self._setNonBlocking(self.fileno)
            port = self.reactor.adoptStreamPort(
                self.fileno, self.addressFamily, factory)
            self._close(self.fileno)
        except:
            return defer.fail()
        return defer.succeed(port)
Implement L{IStreamServerEndpoint.listen} to start listening on, and
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/internet/endpoints.py/AdoptedStreamServerEndpoint.listen