author | mjm <mjm> | 2002-11-27 21:17:57 (UTC) |
---|---|---|
committer | mjm <mjm> | 2002-11-27 21:17:57 (UTC) |
commit | c7ee0193ef7bbcc575226efc0e3992020a9b67b7 (patch) (unidiff) | |
tree | 5e95275f0f517cfc34f625bb0ef9509505ab0ca6 | |
parent | 5092fbe20ceade42de6fb37b2ca1d1cd935bcf2a (diff) | |
download | opie-c7ee0193ef7bbcc575226efc0e3992020a9b67b7.zip opie-c7ee0193ef7bbcc575226efc0e3992020a9b67b7.tar.gz opie-c7ee0193ef7bbcc575226efc0e3992020a9b67b7.tar.bz2 |
added recvcomm and return values
-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 | |||
@@ -60,17 +60,26 @@ Use like printf() function with format strings and so on. | |||
60 | Setup udp socket for incoming commands: | 60 | Setup udp socket for incoming commands: |
61 | int commsock(const char *, int); | 61 | int commsock(const char *, int); |
62 | 62 | ||
63 | Fist argument is the host where it should listen and second | 63 | Fist argument is the host where it should listen and second |
64 | is the port. | 64 | is the port. Socket is returned, on failure -1 is returned. |
65 | 65 | ||
66 | Return values: | 66 | |
67 | Recvfrom socket: | ||
68 | int recv_commsock(int *, char *, int); | ||
69 | |||
70 | First argument is the address of the socket, second is a buffer | ||
71 | that should be filled in and the third is the maxlength of the | ||
72 | buffer. On error, -1 is returned, on success the number of | ||
73 | packet type is returned. (return value should be used with switch | ||
74 | command, for types see proto.hh) | ||
67 | 75 | ||
68 | Send command to udp socket: | 76 | Send command to udp socket: |
69 | int sendcomm(const char *, int, const char *, ...); | 77 | int sendcomm(const char *, int, const char *, ...); |
70 | 78 | ||
71 | First two arguments are the host and port where the command should | 79 | First two arguments are the host and port where the command should |
72 | be send to, followed by buffer that should be send. | 80 | be send to, followed by buffer that should be send. On error, -1 |
81 | is returned. | ||
73 | 82 | ||
74 | 83 | ||
75 | --- | 84 | --- |
76 | 85 | ||