一个套接字如果超过60秒没有对它收发数据,它就会被关闭你掉。那么60秒这个时间长度是否可以设置呢?
在这个网站,一个套接字如果没有活动超过60秒将会被关闭,这个时间是否可以通过指令去改变?
http://processors.wiki.ti.com/index.php/CC3000_HCI_DATA_messages#HCI_DATA_SEND_.280x81.29
HCI_DATA_SEND (0x81)
HCI_DATA_SEND message is used to transmit a TCP packet to a socket. Before issuing a HCI_DATA_SEND message to CC3000, a socket should first be created using HCI_CMND_SOCKET (0x1001). Please note that a socket will be closed by CC3000 after 60 seconds of inactivity, thus a time between creating a socket and issuing HCI_DATA_SEND should not exceed this period! Use the Socket Handle returned by HCI_EVNT_SOCKET (0x1001) in the appropriate HCI_DATA_SEND argument field.
60s是默认值,可以修改,以下是个例子,改到了五分钟【5*60】:
aucInactivity = 300;
netapp_timeout_values(&aucDHCP, &aucARP, &aucKeepalive, &aucInactivity);