WIZnet Developer Forum

Small TCP packets

In TCP client mode (at least) W5200 does not send two packets with ‘data payload length’ <= TCP::MTU without an interleaved ACK from the server!

But in this configuration, if TCP::MTU < ‘data payload length’ <= 2×TCP::MTU, W5200 will send a first packet of length TCP::MTU immediately followed by a second packet with the remaining payload, without waiting for an ACK. On this second packet the server will send ACK immediately, as expected.

So sending small TCP packets is extremely slow, as most server will only acknowledge after 200 milliseconds.
Is there a way to “force” W5200 not to wait for an ACK before sending the second small packet???

Hello, JChMathae

In Sn_MR[5], you can set no Delayed ACK.

This only applies to TCP case and if it is set as ‘1’, ACK packet is immediately transmitted after receiving data packet from a peer.
You can find more details with w5200 datasheet: 4.2 Socket Register; Sn_MR
http://wiznethome.cafe24.com/wp-content/uploads/wiznethome/Chip/W5200/Documents/W5200_DS_V130E.pdf

Thank you,

Lawrence

Lawrence,

I know this, and what you are describing applies to messages that are received, but not for those that are sent…

My problem is about sending small packets, not receiving.

Thank you.

JChMathae,

I am sorry to tell you that I couldn’t find any other solution with w5200. :cry:

TCP client mode does not support No delay ACK.

Thank you,

Lawrence.

Lawrence,

I would rather say that W5200 supports no delayed ACK, but does not support delayed ACK :wink:

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.