PDA

View Full Version : How do I reset the connection TCP ?


jgv276
06-19-2008, 09:51 AM
Hello.

I'm doing a program that communicates via TCP / IP from a computer to a rcm3200 through a port. My problem is when it drops the connection, for example, when I disconnect the cable and connect it again. Even the LEDs are shut down.

How do I reset the connection?. Obviously without rebooting the device

Try:

sock_close (&socket);
sock_abort (&socket);
sock_init ();

but it does not work

Is there any example?

Sorry, but my English is not very good
Thx for advantage

KennyM
09-05-2008, 09:35 AM
You still have to call tcp_tick() until the socket gets completely shut down.
You can tell a tcp socket is closed by tcp_tick(s)==NULL or by running sock_wait_closed(s)