UDPGetArray Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
UDPGetArray Function
C
WORD UDPGetArray(
    BYTE * cData, 
    WORD wDataLen
);
Description

This function reads an array of bytes from the currently active UDP socket, while decrementing the remaining bytes available. UDPIsGetReady should be used before calling this function to specify the currently active socket.

Preconditions

UDPIsGetReady() was previously called to specify the current socket.

Parameters
Parameters 
Description 
cData 
The buffer to receive the bytes being read. If NULL, the bytes are simply discarded without being written anywhere (effectively skips over the bytes in the RX buffer, although if you need to skip a lot of data, seeking using the UDPSetRxBuffer() will be more efficient). 
wDateLen 
Number of bytes to be read from the socket. 
Returns

The number of bytes successfully read from the UDP buffer. If this value is less than wDataLen, then the buffer was emptied and no more data is available.

Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.