lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Example tcpecho_raw (contrib-2.1.0)


From: Matthias Paul
Subject: [lwip-users] Example tcpecho_raw (contrib-2.1.0)
Date: Thu, 13 May 2021 07:50:50 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

Hello lwIP users,

questions are about tcpecho_raw example in contrib-2.1.0. The example is chosen as an entry point for testing / developing a simple TCP-based protocol on a bare-metal microcontroller system.

1. The "enum tcpecho_raw_states" contains states ES_ACCEPTED and ES_RECEIVED, which seem to be identical to me. Is there any difference in those states other than distinguishing between a client which _did_ sent data at least once and a client which never did?

2. If the client closes the connection to the server, "struct tcpecho_raw_state.state" switches to ES_CLOSING to allow sending more yet unset data to the client. After all data has been sent out to the client, the server finally closes the connection. What's the benefit of this behaviour? Is it special for this example or is it  a common "best-practice" in TCP?

3. The example looks sort of WIP. For example, "struct tcpecho_raw_state.retries" is never used. Is there a more complete example out there?


Best regards,
Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]