about
tiny web chat application in pure c
current features:
- http server
- websocket server (based on RFC 6455)
- SSL support with openSSL for https and wss
- IPv6 support
- MIME support: html/htm, jpg/jpeg, png, css, ico
- PostgreSQL support (with
postgresqllibrary) - hashing and salting of passwords
install && run:
make WITH_DB=0 LOG_ON=1 DEBUG=0&& ./server <HOST> <PORT> <FLAGS>
with SSL
- generate private key:
openssl genrsa -out key.pem 2048 - create a CSR
openssl req -new -key key.pem -out csr - create a self-signed certificate
openssl x509 -req -in csr -signkey key.pem -out cert.pem -days 365 - use
--SSLoption to enable https and wss
with PostgreSQL
- install
postgresqllib. - create
conninfofile and fill in connection information - compile with
WITH_DB=1