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.

cc3200 sl_Recv函数如何处理

Other Parts Discussed in Thread: CC3200

请问一下,cc3200 sl_Recv函数如何处理,之前的经验感觉,数据来了低层会有消息上来通知接收不处理,但看CC3200的资料,没有消息上来,需要自己建立一个task 不停的主动调用sl_Recv读取才可以?是这样处理吗?

  • 参考TCP的例子,程序如下

    // waits for 1000 packets from the connected TCP client
    while (lLoopCount < g_ulPacketCount)
    {
    iStatus = sl_Recv(iNewSockID, g_cBsdBuf, iTestBufLen, 0);  //不断的查询接收到的数据,
    if( iStatus <= 0 )
    {
    // error
    sl_Close(iNewSockID);
    sl_Close(iSockID);
    ASSERT_ON_ERROR(RECV_ERROR);
    }

    lLoopCount++;
    }