aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-echo.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-06-08 11:54:06 +0200
committerMattias Andrée <maandree@operamail.com>2014-06-08 11:54:06 +0200
commite0fcd6604aeaa20c6eea8c050371e41f93ff801e (patch)
treead456a4bda12a903db841ea2b100fc2e6bc4d1d3 /src/mds-echo.h
parentbeginning of echo server (diff)
downloadmds-e0fcd6604aeaa20c6eea8c050371e41f93ff801e.tar.gz
mds-e0fcd6604aeaa20c6eea8c050371e41f93ff801e.tar.bz2
mds-e0fcd6604aeaa20c6eea8c050371e41f93ff801e.tar.xz
implement echoing
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/mds-echo.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mds-echo.h b/src/mds-echo.h
index 83a6495..34a12e9 100644
--- a/src/mds-echo.h
+++ b/src/mds-echo.h
@@ -23,18 +23,22 @@
/**
- * Echo the received message
+ * Echo the received message payload
*
- * @return Non-zero on error or interruption, errno will be
- * set accordingly. Destroy the message on error,
- * be aware that the reading could have been
- * interrupted by a signal rather than canonical error.
- * If -2 is returned errno will not have been set,
- * -2 indicates that the message is malformated,
- * which is a state that cannot be recovered from.
+ * @return Zero on success -1 on error or interruption,
+ * errno will be set accordingly
*/
int echo_message(void);
+/**
+ * Send a full message even if interrupted
+ *
+ * @param message The message to send
+ * @param length The length of the message
+ * @return Non-zero on success
+ */
+int full_send(const char* message, size_t length);
+
#endif