lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] tcp_connect


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

Hi!

On Sunday 25 November 2001 19:42, you wrote:
> I want to create a new connection between the board IP: 192,168,1,2  and
> a server listening in 192,168,1,3  port 4443
> This code down here dont work.It seems that never call the
> write_asnwer_to server function.

You could try to use a network sniffer such as tcpdump 
[http://www.tcpdump.org] or ethereal [http://www.ethereal.com] to see what is 
actually going on on the wire.

The callback function specified in the call to tcp_connect() should be called 
even if the connected is refused. In that case, the "err" argument to the 
callback function is set to ERR_RST or similar.

Also, you have written the code the right way.

> if i want to create a new connection i call tcp_connect. but Which value
> has to have last arg in the function if its a NEW connection??

This is the value that should be passed as the first argument to the callback 
function (i.e, write_answer_to_server() in your case).

Note that this is changed in lwIP 0.5. Instead of specifying the callback 
argument in the call to tcp_connect(), the callback argument is specified 
with a new tcp_arg() function.

/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]