lwip-users
[Top][All Lists]
Advanced

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

SV: [lwip-users] pcb's


From: Jan Wester
Subject: SV: [lwip-users] pcb's
Date: Fri, 8 Oct 2004 08:58:44 +0200

Hi

You use the same pcb.

I use two pcb, one for outgoing connection and one for incomming connection. Depending on which coming first, I use it’s pcb for receive.

For incoming I setup receive in tcp_accept(), for outgoing I setup receive in tcp_connect().

/Jan

 

WHI KONSULT

Jan Wester

Scheelegatan 11

SE-112 28 Stockholm

+46 8 449 05 30

 


Från: address@hidden [mailto:address@hidden För Eric Shufro
Skickat: den 7 oktober 2004 19:33
Till: address@hidden
Ämne: [lwip-users] pcb's

 

Can the same pcb be used for an incoming as well as an outgoing tcp connection, or do separate pcb’s need to be created?

 

For example, I create a pcb in main, and bind it to any p and some port. When data arrives, and I want to respond to that data, should I use the same pcb in my application callback function for ‘received tcp data’?

 

Also, timers… I have read many times that they should be called from within the tcpip thread, however, how is this done without dramatically slowing the thread down using things like system timeouts (like in ucos OSTimeDly) in order to set the timeout values? You need at least one timeout for the 250ms timer right, the rest can be done by incrementing a variable n times and then firing when n times has passed. (ex: 4 times for 1 second).

 

Thanks.

 

--eric

 

 


reply via email to

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