That is totally up to you!
You can use simple HTTP messaging but then you would have to poll the HTTP service. It is probably best to use sockets and communicate that way.
Some sample code can be found in Bing: http://www.bing.com/search?q=c%2B%2B+chat+protocol&qs=n&form=QBLH&pq=c%2B%2B+chat+protocol&sc=0-12&sp=-1&sk=&ghc=1
-Jeff
Jeff Sanders (MSFT)