Xml sockets and direct connections

Ive heard a few things about these…
and just recently i wanted to make a game in which you play head to head with other people… but before i get ahead of myself here…
Any tutorials on how to establish a server which receives info from all connected flash movies , and then sends it out to all the ones witch i want to?
basically i was thinking of making a chat thing 1st of all and then depending on how difficult it is move on to my game idea…

I have a server… i just need the knowledge

//VoS