CHASE CHENG <[email protected]> wrote:

> I added the tcp_accepted in my tcp_accept callback function, but it shows
> fail since pcb->state is already changed to ESTABLISHED.
> I wondered where should I call tcp_accepted?
[...]
> Here is part of the code:
> static err_t
> netio_accept(void *arg, struct tcp_pcb *pcb, err_t err)
> {
> ...
>  tcp_accepted(pcb);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> I tried to add tcp_accepted here.

accept callback gets the new, connected, pcb that is in ESTABLISHED
state.  tcp_accepted should be called on the listening pcb, that is in
LISTEN state.

-uwe


_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to