diff options
| author | Reiner Herrmann <reiner@reiner-h.de> | 2011-01-29 16:20:40 +0100 |
|---|---|---|
| committer | Reiner Herrmann <reiner@reiner-h.de> | 2011-01-29 16:20:40 +0100 |
| commit | de36871c582a4f228df71e15560c020f34d39d4a (patch) | |
| tree | 07b5ee2e202b1bec7547e3b3ac8c857d7fec6540 /src/net/comm.c | |
| parent | a85546a9a58ce313302f1be91923a14c5723375c (diff) | |
added more documentation
Diffstat (limited to 'src/net/comm.c')
| -rw-r--r-- | src/net/comm.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net/comm.c b/src/net/comm.c index 7a67c27..0079a81 100644 --- a/src/net/comm.c +++ b/src/net/comm.c @@ -7,6 +7,13 @@ #include "client.h" #include "server.h" +/** + * Generic receive function.\n + * Receives specified message type from socket. Blocks until message is fully received. + * @param[in] Socket on which to receive + * @param[in] type Message type to receive + * @return Indicates success of receiving + */ bool net_recv(const int sock, const msg_type_t type) { msg_t m; @@ -70,6 +77,14 @@ bool net_recv(const int sock, const msg_type_t type) return result; } +/** + * Generic send function.\n + * Transmits specified message type on socket. + * @param[in] Socket on which to send + * @param[in] type Message type to send + * @param[in] data Optional pointer to extra data needed by some message types + * @return Indicates success of sending + */ bool net_send(const int sock, const msg_type_t type, const void *data) { bool result = true; |
