This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TCPNet: closing connection

I have allocated server-type TCP socket and put it into listen state:

 tcp_soc = tcp_get_socket(TCP_TYPE_SERVER, 0, 60, fun_TcpCallBack);
 if (tcp_soc != 0)
 {
   tcp_listen (tcp_soc,PORT);
 }


Then I have connected with socket using Hyper Terminal.

Now I want to disconnect using tcp_close function.
Documentation (http://www.keil.com/support/man/docs/rlarm/rlarm_tcp_close.htm) says that after calling tcp_close socket should go to TCP_STATE_LISTEN.
My problem is that after calling this functions TCP socket goes to TCP_STATE_TWAIT state and remains in this state (never goes to TCP_STATE_LISTEN).

What I am wrong?

thx

t.

0