How to disconnect ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to disconnect ?

1,858 Views
IamX
Contributor I
Hi all
I use NE64_Vend_openTCP.
I initial follow code below.
 
Code:
void tcp_x_init(void){    WriteToSCI1("Initializing TCP server application. \r\n");    tcp_soch = tcp_getsocket(TCP_TYPE_CLIENT, TCP_TOS_NORMAL, TCP_DEF_TOUT, tcp_control_panel_eventlistener);    if( tcp_soch < 0 )    {            WriteToSCI1("TCP server unable to get socket. Resetting!!!\r\n");            RESET_SYSTEM();    }else{      WriteToSCI1("TCP Get Socket Client Type!!!\r\n");    }    (void)tcp_connect(tcp_soch,0xC0A800C7,2002,TCP_PORT+2);}
 
After that.
I will disconnect.
Which fuction for disconnect form tcp.?
How to do it.?
 
Sorry.I just learning TCP stack.
 
Thank you
M.X
Labels (1)
0 Kudos
2 Replies

484 Views
IamX
Contributor I
No.
I use NE64_Vend_openTCP code.
I call tcp_close(tcp_soch) function.
It not disconnect.
How I do it.?
 
Best Regard
Mr.X
0 Kudos

484 Views
mjbcswitzerland
Specialist V

Hi M.X.

If you are learning TCP/IP it may be best to check out the uTasker solution - see posting http://forums.freescale.com/freescale/board/message?board.id=16BITCOMM&message.id=897

It allows fast learning by simulating the NE64 and testing a complete demo project in the simulator without the need for hardware. It is completely free for hobby, educational and other non-commercial projects and is also personally supported by email.

It is a complete solution not only for the TCP/IP stack with FTP, TELNET, etc. but also other interfaces such as UART, file system, LCD display etc. The uTasker is an operating system with these all integrated - the demo project is ready-to-run on all demo boards using ColdWarrior, GNU, or IAR compiler (others being ported...). There is even a practical downloader / debugger as part of the package...

If you want to save some time getting up to speed check it out and don't be shy. There is a growing user community and always help at hand.

Regards

Mark Butcher
www.mjbc.ch

PS. The uTasker runs also on the ColdFire M5223X - the simulator supports it and projects can be converted from NE64 by changing just one compiler switch! The uTasker for M52235 supports now also CAN!!

0 Kudos