GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
socket_recv4(3) FreeBSD Library Functions Manual socket_recv4(3)

socket_recv4 - receive a UDP datagram

#include <libowfat/socket.h>

ssize_t socket_recv4(int s, char* buf, size_t len, char ip[4],uint16* port);

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).

socket_recv4 returns the number of bytes in the datagram if one was received. If not, it returns -1 and sets errno appropriately.

#include <libowfat/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);

socket_recv6(3)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.