lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] Q: tcp_connect()


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] Q: tcp_connect()
Date: Wed, 08 Jan 2003 22:35:58 -0000

Hi Olek!

On Monday 04 February 2002 13:04, you wrote:
> looking at this function from "raw api"
> i'm a bit confused, because we pass a pcb into it,
> and callback function (* connected) ,
> gives us also a pcb.
> it seems, that having (void * arg) we can recognize the context
> of this callback and associate the proper pcb.
> is this redundant, isn't it?
> and if not, then why?

Yes, the application could recognize the context by passing the pcb as a 
parameter in the (void *arg) but I think it is more logical to have the stack 
handle the pcbs. The application programmer shouldn't really be bothered by 
this. Also, it gives a more consistent interface - every callback function 
gets the pcb as its second parameter. 

/adam
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]




reply via email to

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