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.

NDK相关函数



请问一下recvncfrom函数中,这个句柄hBuffer是干什么用的呀?NDK使用手册上说是接收缓冲区句柄,请问这个句柄在网络通信中具体起了什么作用呢?谢谢

下面是相关代码:

HANDLE hBuffer;

 recvncfrom(s, (void **)&pBuf, 0, (PSA)&sinDst, &tmp, &hBuffer);

 recvncfree(hBuffer);

  • 请参考ndk_3_61_01_01\docs\ndk\NDK_API_Reference中说明:
    The NDK_recvncfrom() function attempts to receive a data buffer from a socket. It is normally called with unconnected, non-connection oriented sockets. A pointer to the data buffer is returned in ppbuf. A system handle used to free the buffer is returned in phBuffer.