<< Previous | Index | Next >>

udp_sendto


int udp_sendto( udp_Socket *s, char *buffer, int len,
longword remip, word remport );

Description

Sends a single UDP datagram on a UDP socket. It will send the datagram to the IP address and port specified by remip and remport. Note that this function can be used on a socket that has been "connected" to a different remote host and port.

Parameters

s

Pointer to socket's data structure.

buffer

Buffer that contains the UDP datagram.

len

Length of the UDP datagram.

remip

IP address of the remote host.

remport

Port number of the remote host.

Return value

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

Library

UDP.LIB

See also

udp_send, udp_xsendto, udp_recv, udp_recvfrom, udp_open


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