[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] tcp_write in the connect handling function
From: |
Adam Dunkels |
Subject: |
[lwip-users] Re: [lwip] tcp_write in the connect handling function |
Date: |
Thu, 09 Jan 2003 02:02:14 -0000 |
Hi Rajaram!
(I saw your other mail about this as well.)
On Tuesday 12 February 2002 08.06, you wrote:
> When I try to do a tcp_write from the function that handle the connection
> (i.e. which was passed to tcp_connect), I get the following message and it
> aborts.
>
> Assertion "tcp_enqueue: valid queue length" failed at line 178 in
> /home/rajaram/utils/lwip-0.5.0/src/core/tcp_output.c
>
> I noticed that this was because the function passed to tcp_connect is
> called even before the initial window packet is sent. The server side
> doesnt even receive the connect. When I remove the tcp_write from this
> function It connects fine.
This is a bug in version 0.5.0 of lwIP. It has been fixed in the current CVS
version and will be fixed in the upcoming 0.5.1 version as well.
In the meantime, you can download the CVS version and run that instead.
> So should I wait for some other call back to do the tcp_write? I thought I
> would register a tcp_sent call back. But that doesnt get called in this
> case. So what am I to do if the first thing I want to do after setting up a
> connection is write to it?
You should register a tcp_connect() callback. That will be called at once
when the connection has been established, and then tcp_write() can be used to
send data.
/adam
--
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]