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

netTCP_SendReady hangs when TCP established

Hi

I encounter a strange problem that the netTCP_SendReady gives false forever even the TCP connection is established. Is there a way to find out why the connection is not ready?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
while(is_sending_request)
{
switch (netTCP_GetState(socket))
{
case netTCP_StateUNUSED:
case netTCP_StateCLOSED:
// Connect to TCP socket server
netTCP_Connect(socket, addr, 0);
break;
case netTCP_StateESTABLISHED:
// Connected, send the data
if (netTCP_SendReady(socket) == true)
{
uint32_t mss = netTCP_GetMaxSegmentSize(socket);
send_len = (mss > needed_len) ? needed_len : mss;
uint8_t * sendbuf;
sendbuf = netTCP_GetBuffer(send_len);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0