Distributed Chat (minder/minion tech demo)
This is a distributed text chat solution, written as an example on how to use the MinderHandler/MinderSocket/MinionSocket classes of the C++ Sockets library / framework. Featuring peer list distribution over SSL and (potentially) encrypted traffic between nodes.
It opens a telnet server at port 4404. When a user opens a session, the user is prompted for which name to use.
Commands available after "login" are:
Download dchat-1.2.tar.gz 2006-10-03 Update to sockets library v2.1
Download dchat-1.1.tar.gz 2006-04-20
Download dchat-1.1.zip 2006-04-20dchat-1.0.tar.gz
Please note. This example was primarily developed on linux, and may require some tweaking to compile on other platforms.
To run this a working minder is necessay. I always try to have one online at "minder.alhem.net" port 9696. If not, download and install the minder from the minder project page.
For SSL operation, the minder needs a server public/private key pair. By default, those keys are loaded from the file "comb.pem". File not included in distribution, use openssl utilities to generate a key pair. http://www.openssl.org/
Minder host/port is hardcoded in dchat.cpp - make sure they are correct for the minder you want to use.
The minion connect interval is hardcoded at 60 seconds in this example. So you must wait at least one minute before other minions are contacted. Other minions may contact you earlier, though.
The key.h / key.cpp files are of much more use if a custom encryption class is used instead of NullCrypt (which only base64-encodes whatever is to be sent).