Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8 b/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8 index ebecd82..62e935b 100644 --- a/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8 +++ b/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8 @@ -1,13 +1,13 @@ wl_sock #include <wellenreiter/wl_sock.hh> -int wl_setupsock(const char *host, int port) +int wl_setupsock(const char *host, int port, struct sockaddr_in *) int wl_send(const char *host, int port, const char *string, ...) -int wl_recv(int *socket, char *out, int len) +int wl_recv(int *socket, struct sockaddr_in *, char *out, int len) wl_setupsock() returns the number of the activated udp socket. wl_send() sends string to the given host. @@ -15,10 +15,12 @@ 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_send() returns 0 on error and 1 on success. wl_recv() returns -1 on error and the type of the received packet on success. +Note: To use this function you have to set a sockaddr_in structure +and pass it to wl_setupsock and wl_receive. |