HttpAnsweringMachine
HttpAnsweringMachine copied to clipboard
Http2/gRPC: Add protocol
- https://undertow.io/
- https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
- https://grpc.io/docs/languages/java/basics/
- Basic HTTP2 server using Undertow Server API: https://undertow.io/ ( https://stackoverflow.com/questions/44531004/java-http-2-server )
Undertow server = Undertow.builder().setServerOption(UndertowOptions.ENABLE_HTTP2, true)
.addHttpListener(port, host).setHandler(exchange -> {
System.out.println("Port: " + port + ", Client address is: " + exchange.getConnection().getPeerAddress().toString());
exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "application/json");
// exchange.getResponseSender().send("Undertow Hi");
}).build();
server.start();
- https://stackoverflow.com/questions/67058024/low-level-http2h2-client-and-server-implementation
- Java server with emb jetty
- https://www.speakingjava.com/2020/05/http2-java-server-using-embedded-jetty.html
- https://www.speakingjava.com/2020/06/http2-java-server-using-embedded-jetty-part-2.html
A Java Server that can communicate with HTTP/2.0 client including server-push https://github.com/chanakadkb/Http2-Server Http2-Server
Last executed JDK version : openjdk 11.0.5 2019-10-15
Execution command : java -jar server-v0.1-1.0.0.jar