We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
Yes, I pool tcp_get_state() and main_TcpNet() in one task.