-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/docs/quickintro | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/quickintro b/noncore/net/wellenreiter/libwellenreiter/docs/quickintro index a027a4e..97458b7 100644 --- a/noncore/net/wellenreiter/libwellenreiter/docs/quickintro +++ b/noncore/net/wellenreiter/libwellenreiter/docs/quickintro @@ -63,5 +63,13 @@ int commsock(const char *, int); Fist argument is the host where it should listen and second -is the port. +is the port. Socket is returned, on failure -1 is returned. -Return values: + +Recvfrom socket: +int recv_commsock(int *, char *, int); + +First argument is the address of the socket, second is a buffer +that should be filled in and the third is the maxlength of the +buffer. On error, -1 is returned, on success the number of +packet type is returned. (return value should be used with switch +command, for types see proto.hh) @@ -71,3 +79,4 @@ int sendcomm(const char *, int, const char *, ...); First two arguments are the host and port where the command should -be send to, followed by buffer that should be send. +be send to, followed by buffer that should be send. On error, -1 +is returned. |