I would suggest you have a read through some of the threads here.

They should help you get an idea of what's involved. After that, you'll need to get a handle on what information you need to exchange between clients and then come up with some suitable structures/communications protocol.