selectserver

Download Selectserver here.

Socketserver works well, but I decided that the CPU overhead was a bit high for what it does and running it on Windows requires installing PHP. To get rid of these problems, I've been messing around in C++. Selectserver is a "cheezy multiperson chat server," based on the work of Beej. This server is compiled from C++ code (source included in the zip file) and I've included compiled versions for OS X and XP (linux not yet tested). It runs on the default port of 6780 and logs activity (connections, disconnects) in a file called "selectserver.log". You can launch it by double-clicking from Finder/Explorer or by calling it from the command line (or cmd on XP). If you use the command line call you can define additional parameters:

-d turns on debug mode, which prints server activity to the screen as well as the log file.
-p XXXX sets the port to use for the server to XXXX; for example, calling "selectserver -p 3000" would start the server on port 3000 (the port used by some multitouch protocols).

Essentially, all the discussion from socketserver about protocol still applies to selectserver. You, the builder of applications, must decide how messages are formed and how received messages are handled. One small difference from socketserver is that messages are no longer echoed back to the sender; if a message is received from a connection to selectserver, it is safe to assume that the client receiving the message did not send it.

Beej's source code was released with the following copyright notice:
"The C source code presented in this document is hereby granted to the public domain, and is completely free of any license restriction."
This release notice applies to my derived code as well. Enjoy!

Download Selectserver here.