CrossCore XA
Revision: 1.0
Programmers Guide
Date: Jul 1, 10
Syntax
ssize_t recvfrom(
int socket,
void *buffer,
size_t length,
int flags,
struct sockaddr *address,
socklen_t *address_len
)
Parameters
socket
Socket file descriptor
buffer
Points to buffer where the message should be stored
length
Specifies the length of receive buffer
flags
Specifies the type of message reception
address
A null pointer or points to a sockaddr structure in which the sending address is to
be stored
address_len
Specifies the length of address structure
Return value
Returns length of the message in bytes on success. In case of errors, -1 is returned and errno is set
appropriately.
Example
See example of select.
3.3.7.
write
Description
Write on file.
Include files
#include <unistd.h>
Syntax
int write(
int fd,
const void *buf,
size_t nbyte
)
Parameters
Fd
File
descriptor
Buf
Points to buffer containing data to write
Nbyt
Specifies write size in bytes
www.crosscontrol.com
18