Hello,

I am writing a Web Server using undertow. I am trying to set up read and write timeouts using below code but this does not work. I went  through undertow documentation but I didn't see any other way to set up timeout other that what I am trying?

Undertow.Builder undertowBuilder = Undertow.builder();

undertowBuilder.addHttpListener(80, "localhost");
undertowBuilder.setServerOption(Options.WRITE_TIMEOUT, 10);
undertowBuilder.setServerOption(Options.READ_TIMEOUT, 20);

I also tried to set up using setSocketOptions and setWorkerOptions but that dididn't work either? As a side nots, I am not clear on the difference of these three options: ServerOptions, SocketOptions and WorkerOptions. Any help or pointers will be appreciated.

Thanks!
Prabhash Rathore