lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Using tcp_write() outside tcp_recv callback


From: Jamie
Subject: Re: [lwip-users] Using tcp_write() outside tcp_recv callback
Date: Thu, 9 Apr 2020 15:21:30 -0700 (MST)

Hi Simon,

Thanks for responding. You raise a fair point; I've been through so many
iterations of changes to the original echo example now it probably doesn't
carry much resemblance.

To simplify the issue: I want to send single pbuf packets via tcp_write(),
and make sure the pbuf is subsequently deallocated. At the moment, I'm able
to send a handful of packets via tcp_write(), but I always end up with a
ERR_MEM eventually. I've increased MEM_SIZE to values much larger than
should be required for the size of my pbuf packet, but it will eventually
(we're talking seconds here, not minutes or hours) produce the "tcp_write :
could not allocate memory for pbuf copy size" error.

The tcp_write() function allocates a pbuf, which should then be deallocated
in the sent callback? I've tried to mimic the echo sent callback free_pbuf()
component, the ERR_MEM persists whether I use the sent callback or not.

What am I missing here?



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

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