op_sendto()
Note: Requires Shared Code functionality
Abstract
Sends a message to a specified socket.
Syntax
op_sendto (sockfd, buf, len, flags, dest_addr, addrlen)
| Argument | Type | Description |
|---|---|---|
sockfd |
int |
File descriptor of the sending socket |
buf |
const void * |
Buffer containing the message to send |
len |
size_t |
Length of message |
flags |
int |
not used (pass as 0) |
dest_addr |
const struct sockaddr * |
Pointer to a structure containing the address of the destination socket |
addrlen |
unsigned int |
Size of the dest_addr structure |
Return Type
int
Number of characters sent; -1 if unsuccessful.
Header
shared_code_support.h