summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c335c8)
raw | patch | inline | side by side (parent: 7c335c8)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 25 Jun 2014 21:07:33 +0000 (23:07 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 25 Jun 2014 21:07:33 +0000 (23:07 +0200) |
src/client/sock.c | patch | blob | history | |
src/include/client/sock.h | patch | blob | history |
diff --git a/src/client/sock.c b/src/client/sock.c
index 805dc1d1ce5350da8d1aaced43d9bce53df1d9cd..b60bad45e2cf97d47d2c101513c030f4a27fff5e 100644 (file)
--- a/src/client/sock.c
+++ b/src/client/sock.c
return client->fd;
} /* sdb_client_sockfd */
+int
+sdb_client_shutdown(sdb_client_t *client, int how)
+{
+ if (! client) {
+ errno = ENOTSOCK;
+ return -1;
+ }
+
+ if (client->fd < 0) {
+ errno = EBADF;
+ return -1;
+ }
+
+ return shutdown(client->fd, how);
+} /* sdb_client_shutdown */
+
void
sdb_client_close(sdb_client_t *client)
{
index bce3da91898a670a00eb532e630e2b0663462321..aeed8a253b58f310c4e3e55df13e38f4bfa0232b 100644 (file)
int
sdb_client_sockfd(sdb_client_t *client);
+/*
+ * sdb_client_shutdown:
+ * Shut down the client's send and/or receive operations.
+ * See shutdown(3) for details.
+ */
+int
+sdb_client_shutdown(sdb_client_t *client, int how);
+
/*
* sdb_client_close:
* Close the client connection.