Not "probably" ;^) Effectively tcp_sent() is called when an ACK arrives. That is what the docs say and how TCP works.
No need to do it timely, though.

Perhaps the idea is something like this:

Oh, I need to send something now.
Is there any room ?
        Yes -> Fill as much buffer as I can
        No -> Oops, will try later
I'm done

tcp_sent():
        Is there anything left to be sent ?
                Yes -> Fill as much buffer as I can
                No -> OK, I'm done, let's have some rest
        Return

"try later" can be done by means of your app resources or using tcp_poll() callback, depending on your urge and cpu management needs.

you check the room with tcp_sndbuf(), not MSS. If that does not work, there is something in the config that is not OK and that is over my head. In such a case we should poll one of the wizards.

tcp_output() instructs tcp to hurry up and send now. Otherwise, "he" thinks what is best for everyone ("he" knows better) and will send at will; probably waiting for the entire buffer to fill, since no one told "him" that info was to be treated as urgent.


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to