libowfat_socket_recv4 man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

socket_recv4(3)						       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 data‐
       gram 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)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net