tcp way

Started by
3 comments, last by muster 16 years, 4 months ago
hello guys. I wanna know what is the preferred way that i can do in the following case: I'm making a very small MMORPG that uses TCP connection coded in C#. Lets say if i want to send an action to the server in order to let the server broadcast it, should i connect to the server send the action over this specific action port and disconnect or should i keep a connected port for actions and split the messages received in the network stream? tnx in advance...
Advertisement
Quote:
...a very small MMORPG...


The first 'M' stands for 'Massive'. You are making a multiplayer RPG [smile]. Not every game has to be called a MMORPG [grin].


The TCP three way handshake is expensive enough that if you can avoid it, you should. I recommend keeping the connection open.
Quote:Original post by rip-off
Quote:
...a very small MMORPG...


The first 'M' stands for 'Massive'. You are making a multiplayer RPG [smile]. Not every game has to be called a MMORPG [grin].


The TCP three way handshake is expensive enough that if you can avoid it, you should. I recommend keeping the connection open.


tnx for the help alot i guess u r right, and the small may become massive someday :P. And another thing, how can i make serialization?
How about trying a Google for the word "serialization" and some other word that pertains to your particular need?

The added benefit of keeping a TCP connection open is that you can detect when players disconnect/crash, because the TCP connection goes away. It's also hard for clients to get notified about updates to world state they want to display if they don't already have an open connection to listen to.
enum Bool { True, False, FileNotFound };
Quote:Original post by hplus0603
How about trying a Google for the word "serialization" and some other word that pertains to your particular need?

The added benefit of keeping a TCP connection open is that you can detect when players disconnect/crash, because the TCP connection goes away. It's also hard for clients to get notified about updates to world state they want to display if they don't already have an open connection to listen to.


ok

This topic is closed to new replies.

Advertisement