Hello,
When I send an TCP packet (1022 bytes) from my PC, I receive the packet in 2 times (with TCP_EVT_DATA). 536 bytes first and 486 bytes.
I don't understand why I can't receive it in one time.
Anybody can help me ?
Thanks.
TCP data provides a streamed data link. You should not assume or expect a request to be sent in one block.
However, you might want to look at the Maximum Segment Size.
Indeed.
This is a general property of TCP/IP - nothing specifically to do with Keil, ARM, etc...
The beauty of TCP/IP is that it is available on just about every platform imaginable (and several the you wouldn't imagine!). Therefore, interoperability is key - you absolutely must not rely upon any "special case" bebaviours...
For example, look at the text between "<LECTURE>" and "</LECTURE>" at the start of the following article: www.jmarshall.com/.../
Ok
My old platform (with 8 bits Atmel CPU ) receive the packet in one time.
So why with this configuration, #define TCP_MTU 1460 /* TCP default max. transfer unit */ #define TCP_DEF_MSS 1460 /* TCP default max. segment size option */ I receive always first 536 bytes. Why 2 packets, It is bad for the performance I think
Check the function: tcp_max_dsize
... that the PC actually sent it as a single packet?
Yes I sent only one packet but If I check with an sniffer I see the 2 packets.
tcp_max_dsize return 1460
View all questions in Keil forum