diff options
Diffstat (limited to 'src/libmdsserver/util.h')
-rw-r--r-- | src/libmdsserver/util.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libmdsserver/util.h b/src/libmdsserver/util.h index 685f971..accf038 100644 --- a/src/libmdsserver/util.h +++ b/src/libmdsserver/util.h @@ -128,6 +128,18 @@ int full_write(int fd, const char* buffer, size_t length); */ char* full_read(int fd, size_t* length); + +/** + * Send a full message even if interrupted + * + * @param socket The file descriptor for the socket to use + * @param message The message to send + * @param length The length of the message + * @return Zero on success, -1 on error + */ +int full_send(int socket, const char* message, size_t length); + + /** * Check whether a string begins with a specific string, * where neither of the strings are necessarily NUL-terminated |