'Create and bind my socket, and begin listening on it.
This is called on unserialization, and must be called after creating a
server to begin listening on the specified port.'

def startListening(self):

    if (self._preexistingSocket is None):
        try:
            skt = self.createInternetSocket()
            if (self.addressFamily == socket.AF_INET6):
                addr = _resolveIPv6(self.interface, self.port)
            else:
                addr = (self.interface, self.port)
            skt.bind(addr)
        except socket.error as le:
            raise CannotListenError(self.interface, self.port, le)
        skt.listen(self.backlog)
    else:
        skt = self._preexistingSocket
        self._preexistingSocket = None
        self._shouldShutdown = False
    self._realPortNumber = skt.getsockname()[1]
    log.msg(('%s    starting    on    %s' % (self._getLogPrefix(self.factory), self._realPortNumber)))
    self.factory.doStart()
    self.connected = True
    self.socket = skt
    self.fileno = self.socket.fileno
    self.numberAccepts = 100
    self.startReading()
