Public Attributes | List of all members
tstrSocketRecvMsg Struct Reference

Socket recv status. More...

#include <socket.h>

Public Attributes

uint8pu8Buffer
 
sint16 s16BufferSize
 
struct sockaddr_in strRemoteAddr
 
uint16 u16RemainingSize
 

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, only data up to the buffer size is delivered to the user. The user must call recv again in order to receive the remaining data. A negative or zero buffer size indicates an error with the following code: SOCK_ERR_NO_ERROR : Socket connection closed. The application should now call close(). SOCK_ERR_CONN_ABORTED : Socket connection aborted. The application should now call close(). SOCK_ERR_TIMEOUT : Socket receive timed out. The socket connection remains open.

Definition at line 651 of file socket.h.

Member Data Documentation

◆ pu8Buffer

uint8* tstrSocketRecvMsg::pu8Buffer

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

Definition at line 652 of file socket.h.

◆ s16BufferSize

sint16 tstrSocketRecvMsg::s16BufferSize

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 656 of file socket.h.

◆ strRemoteAddr

struct sockaddr_in tstrSocketRecvMsg::strRemoteAddr

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

Definition at line 665 of file socket.h.

◆ u16RemainingSize

uint16 tstrSocketRecvMsg::u16RemainingSize

The number of bytes remaining in the current recv operation.

Definition at line 661 of file socket.h.


The documentation for this struct was generated from the following file:


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:18:03