I am trying to write a small web server that accepts Http requests and returns Http responses in Java. I use Apache HttpCore and, in particular, I consider HttpServerConnection as the main interface for use in my web server stream.
However, I could not find an example of use on the Internet. I see that there is a receiveRequestHeader method, but I'm not sure when I can use it (do I need to establish a connection first? Is the connection established at creation time? Does this method block?).
Can you provide a short usage example for this class (the implementation I use is DefaultHttpServerConnection ) or suggest a different methodology?
source share