[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] pbuf proccessing in another thread
From: |
ncoage |
Subject: |
Re: [lwip-users] pbuf proccessing in another thread |
Date: |
Thu, 08 Apr 2010 08:56:10 +0200 |
>
> Which API are you using to access lwIP? Could you give a pseudo-code example
> of what you want to do?
>
> Kieran
>
I was thinking about this and it seems that I have chosen the wrong path. I
have another question. Is it possible, for a specific TCP connection, to change
the parameters such as MSS and the receive window in order to have flow
control? Let's assume that our application sends data from TCP to the serial
port. We have a queue of 200 bytes. Each byte received from the tcp stream is
sent to the queue. Another thread retrieves the bytes from the queue and sends
it to the serial port. To prevent overflow of the queue, the window should be
200 bytes (MSS should also be reduced.) After each received byte from the queue
thread should call: tcp_recved(1) (if we can call this function in another
thread, or we can call it using tcpip_callback). Does this make sense?
My default TCP parameter's values are:
#define TCP_WND 4096
#define TCP_MSS 1460