[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] tcp_accept() and tcp_listen()
From: |
Adam Dunkels |
Subject: |
[lwip-users] Re: [lwip] tcp_accept() and tcp_listen() |
Date: |
Wed, 08 Jan 2003 22:43:24 -0000 |
Hi Olek!
On Thursday 24 January 2002 18.53, you wrote:
> when using raw interface:
> should I call tcp_accept() BEFORE tcp_listen() ?
> it seems, that setting callback for accepting
> could be done before changing into the listen state..
>
> otherwise in some circumstances we could
> drop a connection, because "accept" is not set
>
> am I right, or not?
Actually, the order is not really that important. There is a possibility that
a connection is missed if tcp_accept() hasn't been called, but exactly that
would happen if the order was reversed. Look at this:
tcp_listen();
[Connection attempt - dropped because tcp_accept() wasn't set]
tcp_accept();
[New connection attempty - accepted]
tcp_accept();
[Connection attempt - dropped because tcp_listen() wasn't set]
tcp_listen();
[New connection attempty - accepted]
/adam
--
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] Re: [lwip] tcp_accept() and tcp_listen(),
Adam Dunkels <=