lwip-devel
[Top][All Lists]
Advanced

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

RE : [lwip-devel] Move the nagle algorithm to core instead of api


From: Goldschmidt Simon
Subject: RE : [lwip-devel] Move the nagle algorithm to core instead of api
Date: Wed, 20 Jun 2007 09:56:53 +0200

> > Why doesn't directly change tcp_write to include this part :
> >  
> > 
> > if(err == ERR_OK && (msg->conn->pcb.tcp->unacked == NULL ||
> > 
> > (msg->conn->pcb.tcp->flags & TF_NODELAY) ||
> > 
> > (msg->conn->pcb.tcp->snd_queuelen) > 1)) {
> > 
> > err = tcp_output(msg->conn->pcb.tcp);
> > 
> > }
> > 
> > 
> > Without adding any function?
> 
> I like Simon's idea of adding a wrapper function.  Often 
> people want to avoid or disable the nagle algorithm and that 
> will provide a nice neat way of doing it.

I must say I'd prefer tcp_write calling tcp_output (if nagle says yes)
simply because when starting with lwIP, I had a hard time figuring out
why two functions need to be called for sending tcp data.

What do we gain by this? If people want to disable the nagle algorithm,
they can simply call tcp_output after tcp_write. Would people want to
write more than one segment's data without calling tcp_output?

I don't like the idea of changing the behaviour for people who already
know lwIP, but for beginners, I think it's easier.


simon




reply via email to

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