| |

VerySource

 Forgot password?
 Register
Search
View: 863|Reply: 4

Selection of TCP and UDP

[Copy link]

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-2 14:50:01
| Show all posts |Read mode
How should TCP and UDP communication be chosen? For example, for the design of battle platforms, Hao Fang now uses the UDP forwarding mechanism. If TCP is used, will it cause network delay? Will it bring down experience and disconnection?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-4 10:30:01
| Show all posts
TCP provides reliable services. It ensures reliable transmission through technologies such as flow control, serial number, acknowledgment and timers, so there will be network delays in platforms such as battle and chat.
Reply

Use magic Report

0

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Serbia

Post time: 2020-1-11 14:09:02
| Show all posts
The real-time performance of the battle platform is high, and occasional packet loss is acceptable, so it is definitely more appropriate to use udp. If tcp is used, then either the client and each client establish a TCP connection (regardless of the internal network) Either the server establishes a connection with each client and forwards the packets of each client. These two methods are different. How can udp bind a local port to receive packets from different sources?
Reply

Use magic Report

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-2-1 23:45:02
| Show all posts
However, according to the experiment, there may be a disconnection in the TCP forwarding through the server. This is very unclear.
Reply

Use magic Report

1

Threads

9

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-4-15 23:30:01
| Show all posts
Tcp cost is high, udp small data is superior
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list