'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):

    log.msg(('%s    starting    on    %r' % (self._getLogPrefix(self.factory), _coerceToFilesystemEncoding('', self.port))))
    if self.wantPID:
        self.lockFile = lockfile.FilesystemLock((self.port + '.lock'))
        if (not self.lockFile.lock()):
            raise error.CannotListenError(None, self.port, 'Cannot    acquire    lock')
        elif (not self.lockFile.clean):
            try:
                if stat.S_ISSOCK(os.stat(self.port).st_mode):
                    os.remove(self.port)
            except:
                pass
    self.factory.doStart()
    try:
        if (self._preexistingSocket is not None):
            skt = self._preexistingSocket
            self._preexistingSocket = None
        else:
            skt = self.createInternetSocket()
            skt.bind(self.port)
    except socket.error as le:
        raise error.CannotListenError(None, self.port, le)
    else:
        if _inFilesystemNamespace(self.port):
            os.chmod(self.port, self.mode)
        skt.listen(self.backlog)
        self.connected = True
        self.socket = skt
        self.fileno = self.socket.fileno
        self.numberAccepts = 100
        self.startReading()
