This code is inspired from the Golang standard library,
implements restricted of Server that implements HTTP/1.1 and HTTP/2.0 protocols
- implement
HTTP/1.1Server usingtcpand you can run it underTLSas well - implement
HTTP/2.0Server usingtcp( still work in progress ) - making sure it uses multi-threading and connection persistence for each case as defined per protocol
To use HTTP/2.0 you should use the TLS Version (which is why ListenAndServeTLS is used instead of ListenAndServe)
- Create self signed ssl certificates by running
openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key - run
make buildto build the executable and then./main-exec - To use the tls
./main-exec -tls=trueby default it is false - to configure the port that you want to run
./main-exec -addr=8081