I am developing a grizzly-based-server that should communicate with a lot of clients. Basically, I created a listener that listens to a specific port and I add this listener to my http-server-instance. Since I need very simple communication between my clients and my grizzly-server, I want to disable chunked Transfer-Encoding. According to this link https://grizzly.java.net/httpserverframework.html, I can enable/disable HTTP-related features of my listener such as chunked transfer-encoding. I tried to find a way to do it but it was not successfull. Here is some code.
HttpServer server = HttpServer.createSimpleServer();
server.getServerConfiguration().addHttpHandler(new myHandler());
//add new listener
NetworkListener nt=new NetworkListener("myServer",ip_adresse,port);
server.addListener(nt);
try {
        //start the server
        server.start();
        Thread.currentThread().join();
    } catch (IOException e) {
        e.printStackTrace();
    } catch (InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
Any Idea?
Please use NetworkListener to disable chunking:
networkListener.setChunkingEnabled(false);
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With