This is an idea for an irc client. It would consist of several separate and distinct programs, each running asynchronously from each other.
The main program does the following:
- it connects to one or more irc servers
- it creates a listening network socket on the loopback interface, so only processes on the user's computer can connect to said socket.
- it spawns one or more "tasks", using popen, and passes the port of the socket (from step 2) to each task, either on the commandline or via stdin. Don't forget to escape specials in the executable's name. Maybe I'm the only person in the world with a space in my user name (and thus my home directory), but maybe there're others.