On Tue, 2009-08-11 at 16:45 +0200, [email protected] wrote: > Kieran Mansley wrote: > > One thing I noticed was the way it calls tcp_sent() to specify the > > callback every time it does a write is harmless but not a good example - > > it should only need to be called once to set the callback up. > > > It does? As I see it, tcp_sent() is only called once - after receiving > the request. And since it does not implement keepalive, this can only > happen once per pcb (also guarded by if (hs->file == NULL) in http_recv).
My mistake, sorry. I'd still rather see it specified as part of the connection setup. I wonder if the current code could send it all before send_data() returned and tcp_sent() is called, and so never call the sent callback because it was NULL when the data were written and ACKed. Unlikely perhaps, but still not a great example. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
