A minimal IRC-like server implementation written in C++, designed to support multiple clients connecting concurrently and communicating through standard IRC commands.
- TCP Socket Server
- Listens for incoming client connections using non-blocking sockets and the
poll()system call.
- Listens for incoming client connections using non-blocking sockets and the
- Multi-Client Support
- Handles multiple simultaneous connections without threading, using event-driven I/O.
- Command Parsing
- Supports a subset of IRC commands such as
PASS,NICK,USER,JOIN,PRIVMSG,PAR,KICK,INVITE, andQUIT.
- Supports a subset of IRC commands such as
- Channel Management
- Clients can create and join channels, send private or group messages, and set channel topics.
- User Authentication
- Implements password protection for server access (defined at startup).
- Graceful Disconnects
- Properly handles client exits, timeouts, and broken connections.
- Initialization
- The server is launched with a port and password. It initializes a listening socket and enters the main event loop.
- Connection Handling
- New connections are accepted and registered to a list of file descriptors monitored by
poll().
- New connections are accepted and registered to a list of file descriptors monitored by
- Command Handling
- Incoming messages are parsed into commands, and handlers are invoked accordingly.
- Broadcasting
- Messages are distributed to appropriate recipients based on channel membership or target nicknames.