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.1
Server usingtcp
and you can run it underTLS
as well - implement
HTTP/2.0
Server 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 build
to build the executable and then./main-exec
- To use the tls
./main-exec -tls=true
by default it is false - to configure the port that you want to run
./main-exec -addr=8081