This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC3220SF-LAUNCHXL: socket with timeout

Part Number: CC3220SF-LAUNCHXL

Tool/software: Code Composer Studio

I can't understand why sl_recv freeze when i open socket with timeout

socket option

struct SlTimeval_t TimeVal;
TimeVal.tv_sec = 2; // Seconds
TimeVal.tv_usec = 0; // Microseconds. 10000 microseconds resolution
status = sl_SetSockOpt(sid, SL_SOL_SOCKET, SL_SO_RCVTIMEO, (_u8 *)&TimeVal, sizeof(TimeVal));

open socked

status = sl_Socket(SL_AF_INET, SL_SOCK_STREAM, 0);
if (status < 0)
{
//code
}

receive data

status = sl_Recv(sockId, SRVX.raw, MAX_FRAME_LENGTH, 0);

on sl_Recv socket waits and waits for the packet