summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8
blob: ebecd82323778df245e0bc29c8a687d3f6982849 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
wl_sock

#include <wellenreiter/wl_sock.hh>

int wl_setupsock(const char *host, int port)
int wl_send(const char *host, int port, const char *string, ...)
int wl_recv(int *socket, char *out, int len)


wl_setupsock() returns the number of the activated udp socket.

wl_send() sends string to the given host.

wl_recv() checks for incoming data on a socket (created using
wl_setupsock()). It writes the incoming data to out with a
maxlen of len.


wl_setupsock() returns -1 on error and the number of socket on
success.
wl_send() returns -1 on error and 0 on success.
wl_recv() returns -1 on error and the type of the received packet
on success.