- A simple web server listens for TCP connections, parses HTTP requests, and responds to clients.
- A multi-client-chat server listens for TCP connections, receives messages from a client, and broadcasts to others.
- Compliler: MinGW32-g++
- Makefile: MinGW32-make
Note
: if using Microsoft Visual Studio, please uncomment the line// #pragma comment (lib, "ws2_32.lib")
intcp_listener.h
file to use library ws2_32.lib
Note: switch SERVER_TYPE
between WEB_SERVER
and CHAT_SERVER
to change server types. (the line #define SERVER_TYPE (WEB_SERVER)
in server.cpp)
> mingw32-make # build
> mingw32-make clean # clean
> server # run server
- Apply multi-threading to serve different clients.