socket_udp4(3diet)

socket_udp43diet

Create a non-blocking udp/ip datagram socket

Usage

#include <socket.h>

int socket_udp4();

Overview

socket_udp4 creates a non-blocking UDP/IP datagram socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_udp4 returns -1, setting errno appropriately, without allocating any resources.

Examples

#include <socket.h>

int s;
char ip[4];
uint16 p;

s = socket_udp4();
socket_bind4(s,ip,p);
socket_connect4(s,ip,p);

Releases

Unchanged in 4 releases since Debian 3.1 (Sarge).

  1. 3.1–6.0

From libowfat-dev 0.28-2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.