I am writing a socket server and a flash game client. The game requires real-time teams, such as movement and rotation. It is important that these commands are sent by the server to the client as soon as possible, because other clients would otherwise synchronize repeatedly with the move / rotate client.
This is an example of a problem caused by Nagle arithmetic:
Note : see the table of commands below if you want to understand what these commands mean.
The first is the ship that I moved (moved forward + right, forward was received, but the right is not)
Client Submission Commands:
84796: Sending data: 2
84796: Sending data: 2
84904: Sending data: 2
84904: Sending data: 2
86187: Sending data: 2
86188: Sending data: 2
86374: Sending data: 2
86404: Sending data: 2
Client receiving commands:
79244: Raw receive: 3
79244: New command: 3
79398: Raw receive: 3
79399: New command: 3
79399: New command: 3
79399: New command: 3
80635: Raw receive: 3
80635: New command: 3
80908: Raw receive: 3
80908: New command: 3
80908: New command: 3
80908: New command: 3
"" - , , ,
,
A (: 0), B (: 0)
A (: 0), B (: 155)
A (: 108), B (: 0)
A (: 0), B (: 0)
A (: 1283), B (: 1236)
A (: 1), B (: 273)
A (: 186), B (: 0)
A (: 30), B (: 0)
, :
- >
2
0) now not turning
1) now turning left
2) now turning right
3) now not moving
4) now moving forward
- >
3
[shipId]
0) now not turning
1) now turning left
2) now turning right
3) now not moving
4) now moving forward
, , - "Nagle". , , .
, TCP-. Nagle. , googled ( , tcp , ) , Nagle.
, Nagle ? ()?
.
-