QUOTE(barig4 @ 3 Jul, 2009 - 07:19 AM)

Hi, I've made a Tic-Tac-Toe game in C# and I want to play with a friend of mine over the net. I need to write a code that will enable one of us to host the game, so that the other will join it.
I need help getting the information i need, I've searched the net but the closest thing i found was Client/Server connection and I didn't think that it fits my needs. I don't know where to start and I could use some help.
You would basically want a type of client/server connection. The best thing I can think is this:
When the program starts you give the player the choice to host the game or join the game.
If the player hosts the game, you get the players IP address and set up a TCP/IP listener on the IP address.
The other player would have to know what the TCP/IP listener's properties are and would connect to that listner with a TCP/IP client.
Just an idea on what you can look at.