void start() {
        connectionThread = new Thread() {
            public void run() {
                while(true) {
                    HttpServer.HttpRequest req;
                    try {
                        req = readRequest();
                    } catch(IOException e) {
                        if(closing)
                            return;
                        throw new RuntimeException(e);
                    }
                    if(req == null)
                        return;
                    HttpServer.HttpExchange exchange = new HttpServer.HttpExchange(EstablishedConnection.this, req);
                    server.requestHandler.onRequest(exchange);
                }
            }
        };
        
        connectionThread.setName("Server connection " + socket.getPort() + "->" + server.getLocalPort());
        connectionThread.start();
    }