Syntax
int SyncRecvSc(
SOCKET sock,
void *pvRecvBuf,
unsigned short u16BufLen,
unsigned long u32Timeoutmsec,
unsigned short *u16RemainingLen
);
Parameters
- sock
- [in] Socket descriptor
- pvRecvBuf
- [out] Specify the receive buffer.
- u16BufLen
- [in] Specify the size (bytes) of the receive buffer.
- u32Timeoutmsec
-
[in] Specify the timeout (msec).
If you specify 0 or 4294967295 (0xFFFFFFFF), it will not time out. - u16RemainingLen
- [out] The remaining size (in bytes) of the current receive operation.
Return value
The following values will be returned.Value | Description |
---|---|
Positive number | Receive size. |
SOCK_ERR_TIMEOUT | If no data was received during the timeout.合 |
SOCK_ERROR | Socket error Close the socket and recreate it. |
SOCK_CLOSE | Remote disconnect Close the socket and recreate it. |
SOCK_RECV_ERROR | Receive error The receive size has exceeded the buffer size. Please adjust the buffer size to an appropriate size. |
M2M_ERR_SLEEP_FAIL | Initialize with SysWLANInit function. |
Other than the above | Failed |
Remarks
Receives socket (TCP compatible).Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Last updated: 2020/10/14