<< Previous | Index | Next >>

udp_send


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

Description

Sends a single UDP datagram on a UDP socket. It will not work for a socket for which the remip parameter to udp_open() was 0, unless a datagram has first been received on the socket. If the remip parameter to udp_open() was -1, the datagram will be send to the broadcast address.

Parameters

s

Pointer to socket's data structure.

buffer

Buffer that contains the UDP datagram

len

Length of the UDP datagram.

Return value

0: Number of bytes sent.
-1: Failure.
-2: Failed because hardware address not resolved.

Library

UDP.LIB

See also

udp_sendto, udp_recv, udp_recvfrom, udp_open


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