debian man page for socket_recv4

Query: socket_recv4

OS: debian

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

socket_recv4(3) 					     Library Functions Manual						   socket_recv4(3)

NAME
socket_recv4 - receive a UDP datagram
SYNTAX
#include <socket.h> ssize_t socket_recv4(int s, char* buf, size_t len, char ip[4],uint16* port);
DESCRIPTION
socket_recv4 receives up to len bytes starting at buf from a UDP datagram coming in on the socket s. It writes the UDP port to port and the IP address to ip, and returns the number of bytes actually received (or -1 if anything went wrong).
RETURN VALUE
socket_recv4 returns the number of bytes in the datagram if one was received. If not, it returns -1 and sets errno appropriately.
EXAMPLE
#include <socket.h> int s; char ip[4]; uint16 p; char buf[1000]; int len; s = socket_tcp4(); socket_bind4(s,ip,p); len = socket_recv4(s,buf,sizeof(buf),ip,&p);
SEE ALSO
socket_recv6(3) socket_recv4(3)
Related Man Pages
io_waitread(3) - debian
socket_connect4(3) - debian
stralloc(3) - debian
udp(7) - osf1
socket_sendto(3) - php
Similar Topics in the Unix Linux Community
awk or sed - Convert 2 lines to 1 line
Detecting unused variables...
Find columns in a file based on header and print to new file
A (ksh) Library For and From UNIX.com
New UNIX and Linux History Sections