diff options
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; |
