lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Managing multiple TCP connections


From: Erik
Subject: Re: [lwip-users] Managing multiple TCP connections
Date: Thu, 19 Aug 2004 10:46:52 +0200

Yet another problem.

I've implemented lwIP as a kind of static library with a jump table to
reference functions and variables inside lwIP.
I did not include tcp_active_pcbs in the jump table.
To change the jump table I'd have to change the library which would mean a
major update.
I'd rather go on with the lwIP library as it is right now.
So, I cannot reference tcp_active_pcbs.
I know already that allocation of pcbs can change during the lifetime of a
connection.
If I use the reference to the pcb I get when the accept function is called,
can I be sure this pcb reference will remain
the same during the rest of the connection, and can I use this reference
outside the callback functions as a reference
to that connection?

Regards
Erik

----- Original Message ----- 
From: "Erik" <address@hidden>
To: "Mailing list for lwIP users" <address@hidden>
Sent: Wednesday, August 18, 2004 6:43 PM
Subject: Re: [lwip-users] Managing multiple TCP connections


> Hi Kieran
>
> >
> > Can you explain what you need to do to iterate through the connections?
> > This might help come up with a good way to do this.  In normal usage you
> > would set up callbacks so that you are prompted to do any required
> > actions, and connection iteration (to, for example, see if there are any
> > data to read) would not be necessary.
> >
>
> Problem is as follows:
> Some data received has to be forwarded to a connected serial device.
> I cannot wait for an answer from the device as this would block other
tasks.
> So, upon receiving the answer from the device, I do not know from which
> connection
> the original request came.
> I suppose this problem can be solved by using tcp_active_pcbs and storing
> the request info in the callback_arg argument.
> I just wondered if this is the right way to do it.
>
> Regards
> Erik
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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