[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] tcp_write function merges 2 different packets while sen
From: |
goldsimon |
Subject: |
Re: [lwip-users] tcp_write function merges 2 different packets while sending |
Date: |
Mon, 23 Dec 2019 15:25:58 +0100 |
User-agent: |
K-9 Mail for Android |
Liju John wrote:
>Still you can disable the streaming feature of the TCP and send like
>udp
>packets with TCP_NODELAY set socket option on the TCP level. This
>option is
>available on the socket. You can explore on it.
While this is correct, it's not a good suggestion in this thread: the remote
host is free to combine multiple rx packets into one 'read' call, so even if tx
is framed as written, it may or may not work on the remote side.
An I say it's even dangerous to rely on this as it might work until segments
are dropped. You think the system is working, but in fact, it might break on
first packet loss.
Instead, so the right think and create your application layer protocol so that
it can handle a byte stream, not rely on packets.
Regards,
Simon