GENERIC CHAT - SYSTEM FOR CROSS PROTOCOL CHAT

The Concept -

A chat system where messages are sent from a chat client to an intermediate server encoded in XML. The server translates the message to the required protocol and dispatches it to a real server. Protocol services are provided by protocol clients, which connect to the server and give a protocol name and version, as well as a signature that will tell the server to divert incoming packets with that signature to it.

When the intermediate server receives a dispatch, it attempts to match up the request with a protocol client. If it can't find one, it throws an error at the requesting chat client. Otherwise it gives the request to the protocol client, and the protocol client returns an encoded request and an appropriate destination IP. The chat server then relays the data to the destination IP. (Authentication will probably be needed to some extent to prevent abuse)

Protocol clients also interpret incoming packets into XCHAT packets.

Message and file transfer samples:

Code:
<XCHAT>
	<PROTOCOL TRANSPORT=MSN VERSION=1>
		<USER ID="GGS" />
		<DEST ID="MIKE" />

		<MESSAGE>
			Hello...%20messages%20are%20transfered%20as%20a%20solid%20string.
		</MESSAGE>
	</PROTOCOL>
</XCHAT>
Code:
<XCHAT>
	<PROTOCOL TRANSPORT=AIM VERSION=1>
		<USER ID="GGS" />
		<DEST ID="MIKE" />		

		<TRANSFER TYPE=CHUNK ID=0 CHUNKS=1 CSIZE=92 NAME="TEST.TXT">
			#This is a file test... The # character signifies the start of the transfer.
		</TRANSFER>
	</PROTOCOL>
</XCHAT>
Example dispatch message:

Code:
<XCHAT>
	<DISPATCH>
		<DESTINATION=255.255.255.255 />

		<BLOB>
			#SEND_THIS
		</BLOB>
	</DISPATCH>
</XCHAT>