viyancs
viyancs

Reputation: 2339

what the different tcp/ip protocol and UDP protocol to make a communication in network programing

i wanna to ask about the different http,TCP,UDP protocoll in network programing, what is the protocoll would you recommended when i want to create game,can you explain me? because i new to starting develop network programing with soket communication.thanks for helping

Upvotes: 0

Views: 329

Answers (2)

rr_ovi
rr_ovi

Reputation: 293

My friend, that depends on what is your desire. When u r sending continuous updates to all the users, u should use UDP. Because if an update is lost, that will certainly not the end of the universe. In a network based game, so many updates per second is to be transmitted, so if some r lost, nothing very harmful will happen.

On the other hand, if u use TCP, if a packet is lost, then the reliability of the protocol ensures that it will be sent again. But think about the overhead it will create across the network. If ur game user has comparatively low bandwidth, they will face serious trouble.

Upvotes: 1

Alle
Alle

Reputation: 324

I think that depends on what kind of game you are making. For a game which require quick, continous updates UDP might be better, but I have always gone with TCP. If you are making some kind of turn based game where you don't send data often I'd use TCP.

This might also be helpful: UDP vs TCP, how much faster is it?

Upvotes: 1

Related Questions