TCP CLIENT TCP客户端
It is same as TCP server except ‘CONNECT’ state. User can refer to the above “TCP SERVER” section.
除了连接状态不同外,与TCP服务器一样,用户能够参考上面的"TCP SERVER“部分
连接
将连接请求(SYN包)传输到“TCP服务器”。当与“TCP服务器”建立“连接套接字”时,可能会发生诸如arpto、tcpto等超时。
{
Sn_DIPR0 = server_ip; /* set TCP SERVER IP address*/
Sn_DPORT0 = server_port; /* set TCP SERVER listen port number*/
Sn_CR = CONNECT; /* set CONNECT command */
}