'Accept a new connection and put it on the Queue.'

def tick(self):

    try:
        (s, addr) = self.socket.accept()
        if self.stats['Enabled']:
            self.stats['Accepts'] += 1
        if (not self.ready):
            return
        prevent_socket_inheritance(s)
        if hasattr(s, 'settimeout'):
            s.settimeout(self.timeout)
        makefile = CP_fileobject
        ssl_env = {}
        if (self.ssl_adapter is not None):
            try:
                (s, ssl_env) = self.ssl_adapter.wrap(s)
            except NoSSLError:
                msg = 'The    client    sent    a    plain    HTTP    request,    but    this    server    only    speaks    HTTPS    on    this    port.'
                buf = [('%s    400    Bad    Request\r\n' % self.protocol), ('Content-Length:    %s\r\n' % len(msg)), 'Content-Type:    text/plain\r\n\r\n', msg]
                wfile = makefile(s, 'wb', DEFAULT_BUFFER_SIZE)
                try:
                    wfile.sendall(''.join(buf))
                except socket.error:
                    x = sys.exc_info()[1]
                    if (x.args[0] not in socket_errors_to_ignore):
                        raise
                return
            if (not s):
                return
            makefile = self.ssl_adapter.makefile
            if hasattr(s, 'settimeout'):
                s.settimeout(self.timeout)
        conn = self.ConnectionClass(self, s, makefile)
        if (not isinstance(self.bind_addr, basestring)):
            if (addr is None):
                if (len(s.getsockname()) == 2):
                    addr = ('0.0.0.0', 0)
                else:
                    addr = ('::', 0)
            conn.remote_addr = addr[0]
            conn.remote_port = addr[1]
        conn.ssl_env = ssl_env
        self.requests.put(conn)
    except socket.timeout:
        return
    except socket.error:
        x = sys.exc_info()[1]
        if self.stats['Enabled']:
            self.stats['Socket    Errors'] += 1
        if (x.args[0] in socket_error_eintr):
            return
        if (x.args[0] in socket_errors_nonblocking):
            return
        if (x.args[0] in socket_errors_to_ignore):
            return
        raise
