Delta / NNN50_WIFI_API

Dependents:   NNN50_CE_Test_UDP NNN50_linux_firmware NNN50_SoftAP_HelloWorld NNN50_BLEWIFISensor ... more

Embed: (wiki syntax)

« Back to documentation index

tstrSocketRecvMsg Struct Reference

tstrSocketRecvMsg Struct Reference
[Asynchronous Events]

Socket recv status. More...

#include <m2m_socket_host_if.h>

Data Fields

uint8pu8Buffer
sint16 s16BufferSize
uint16 u16RemainingSize
struct sockaddr_in strRemoteAddr

Detailed Description

Socket recv status.

It is passed to the APPSocketEventHandler with SOCKET_MSG_RECV or SOCKET_MSG_RECVFROM message type in a response to a user call to the recv or recvfrom. If the received data from the remote peer is larger than the USER Buffer size (given at recv call), the data is delivered to the user in a number of consecutive chunks according to the USER Buffer size.

Socket receive information is returned through this structure in response to the asynchronous call to the recv or recvfrom socket functions. This structure together with the events SOCKET_MSG_RECV or SOCKET_MSG_RECVFROM are passed-in parameters to the callback function.

Remarks:
In case the received data from the remote peer is larger than the USER buffer size defined during the asynchronous call to the recv function, the data is delivered to the user in a number of consecutive chunks according to the USER Buffer size. a negative or zero buffer size indicates an error with the following code: SOCK_ERR_NO_ERROR : Socket connection closed SOCK_ERR_CONN_ABORTED : Socket connection aborted : Socket receive timed out

Definition at line 795 of file socket.h.


Field Documentation

Pointer to the USER buffer (passed to recv and recvfrom function) containing the received data chunk.

Definition at line 797 of file socket.h.

The received data chunk size. Holds a negative value if there is a receive error or ZERO on success upon reception of close socket message.

Definition at line 801 of file socket.h.

Socket address structure for the remote peer. It is valid for SOCKET_MSG_RECVFROM event.

Definition at line 809 of file socket.h.

The number of bytes remaining in the current recv operation.

Definition at line 806 of file socket.h.