<< Previous | Index | Next >>

udp_recv


int udp_recv( udp_Socket *s, char *buffer, int len );

Description

Receives a single UDP datagram on a UDP socket. If the buffer is not large enough for the datagram, the datagram is truncated, and the remainder discarded.

Parameters

s

Pointer to socket's data structure.

buffer

Buffer where the UDP datagram will be stored.

len

Maximum length of the buffer.

Return value

 0: Number of bytes received.
 -1: No datagram waiting.
<-1: Error.

Library

UDP.LIB

See also

udp_recvfrom, udp_send, udp_sendto, udp_open


TCP/IP Manual
Vol 1
<<Previous | Index | Next>> rabbit.com