Thanks Jonathan, I see that it outputs a segment in tcp_output, but I'm not calling tcp_output. I'm calling tcp_write multiple times. I do see it append a segment in tcp_enqueue. Shouldn't tcp_output pass a linked pbuf chain with enough data up to the MSS? If I call tcp_write 10 times with 10 "Hello World"s, I would think one Ethernet frame would be sent with a call to ip_output with one pbuf pointer with 11 payloads (the header and 10 data payloads).
Bill > I believe tcp_output always outputs a segment. What tcp_output_nagle does > is choose times _not_ to - i.e. to wait a bit and save it up. You can see > if defined in include/lwip/tcp.h. > > In other words, only call tcp_output when you do want to output something. > And arguably the same for tcp_output_nagle (although it won't guarantee > you > will). Obviously you may need some care you don't keep enqueuing data and > never sending it, until you run out of buffers! > > Jifl > -- > eCosCentric Limited http://www.eCosCentric.com/ The eCos experts > ** Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv> ** > ** April 15-17 2008, Booth 3012, San Jose McEnery Convention Center ** > Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 > Registered in England and Wales: Reg No 4422071. > ------["Si fractum non sit, noli id reficere"]------ Opinions==mine > > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
