diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-05-07 01:13:31 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-05-07 01:13:31 +0200 |
commit | a33dd2293f619f4bdab65fbb89c29f9ac2279cc4 (patch) | |
tree | 9297cdb9f607dc92c3887d522c8e7db292e3b8e8 /src/libmdsserver/util.h | |
parent | add a todo (diff) | |
download | mds-a33dd2293f619f4bdab65fbb89c29f9ac2279cc4.tar.gz mds-a33dd2293f619f4bdab65fbb89c29f9ac2279cc4.tar.bz2 mds-a33dd2293f619f4bdab65fbb89c29f9ac2279cc4.tar.xz |
misc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/libmdsserver/util.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libmdsserver/util.h b/src/libmdsserver/util.h index 8bfaa71..3a6e9b1 100644 --- a/src/libmdsserver/util.h +++ b/src/libmdsserver/util.h @@ -19,6 +19,9 @@ #define MDS_LIBMDSSERVER_UTIL_H +#include <stddef.h> + + /** * Read an environment variable, but handle it as undefined if empty * @@ -50,6 +53,16 @@ void reexec_server(int argc, char** argv, int reexeced); */ int xsigaction(int signo, void (*function)(int signo)); +/** + * Send a message over a socket + * + * @param socket The file descriptor of the socket + * @param message The message to send + * @param length The length of the message + * @return The number of bytes that have been sent (even on error) + */ +size_t send_message(int socket, const char* message, size_t length); + #endif |