aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-07 13:24:51 +0200
committerMax Kellermann <max@duempel.org>2008-09-07 13:24:51 +0200
commit33aec0d6732a529342e59933b351f4e591d8f8f4 (patch)
treed0bb8a5729398cbf57d63058f6ecf6cd7736a731 /src/client.h
parenta34e1d2b84c72b27212eed4e1483a20440da44ab (diff)
downloadmpd-33aec0d6732a529342e59933b351f4e591d8f8f4.tar.gz
mpd-33aec0d6732a529342e59933b351f4e591d8f8f4.tar.xz
mpd-33aec0d6732a529342e59933b351f4e591d8f8f4.zip
client: added client_write() and client_puts()
client_write() writes a buffer to the client and buffers it if required. client_puts() does the same for a C string. The next patch will add more tools which will replace fdprintf() later.
Diffstat (limited to '')
-rw-r--r--src/client.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client.h b/src/client.h
index dc67c044f..500e47b8f 100644
--- a/src/client.h
+++ b/src/client.h
@@ -39,6 +39,16 @@ int client_get_fd(struct client *client);
int client_is_expired(const struct client *client);
+/**
+ * Write a block of data to the client.
+ */
+void client_write(struct client *client, const char *data, size_t length);
+
+/**
+ * Write a C string to the client.
+ */
+void client_puts(struct client *client, const char *s);
+
int client_print(int fd, const char *buffer, size_t len);
#endif