From de36871c582a4f228df71e15560c020f34d39d4a Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sat, 29 Jan 2011 16:20:40 +0100 Subject: added more documentation --- src/net/comm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/net/comm.c') 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; -- cgit v1.2.3