lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] flow of lwip as a stream client


From: Simon Goldschmidt
Subject: Re: [lwip-users] flow of lwip as a stream client
Date: Fri, 02 Mar 2012 15:43:17 +0100

trex7 <address@hidden> wrote:
> I guess we have a communication problem here. Your proposal is exactly
> what
> I'm doing.

Indeed we seem to have a communication problem. From what you have written in 
your last mail, my proposal is different than what you're doing:

- You are always calling tcp_recved() when copying data to the buffer
- I propose to only call tcp_recved() for the amount of data that your buffer 
can hold.

Calling tcp_recved() gives the server permission to send more data, so you can 
use this to throttle the server. The server will never send more data than fits 
into the TCP window, so if you implement this correctly, you will *never* get 
more data than you can buffer. The only requirement here is that 
sizeof(your_buffer) >= TCP_WND.

Simon
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



reply via email to

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