mssd is a Modular Socket Server Daemon written in Perl.
It's primary purpose is to be used with Macromedia Flash clients using XML, but it provides a plug-in architecture which theoreticaly allows any TCP/IP protocol to be implemented.
It is currently quite stable, and work is being done to add additional features.
Go to the project page and download mssd