summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd7ed3a)
raw | patch | inline | side by side (parent: dd7ed3a)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 12 Jan 2014 21:11:34 +0000 (22:11 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 12 Jan 2014 21:11:34 +0000 (22:11 +0100) |
This function returns the file-descriptor associated with the client's network
socket.
socket.
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 a2417ad6d872029e8c80f51d83899b65e9026a06..49cefdf0935fb8315cda15c6b8921bbfa6d0a510 100644 (file)
--- a/src/client/sock.c
+++ b/src/client/sock.c
return 0;
} /* sdb_client_connect */
+int
+sdb_client_sockfd(sdb_client_t *client)
+{
+ if (! client)
+ return -1;
+ return client->fd;
+} /* sdb_client_sockfd */
+
void
sdb_client_close(sdb_client_t *client)
{
index c88fc9a02041d2a7d0f06970428e17dfcb064c07..39e7622f3b1959fd1fbb1de11301adc25a1b842b 100644 (file)
int
sdb_client_connect(sdb_client_t *client, const char *username);
+/*
+ * sdb_client_sockfd:
+ * Return the client socket's file descriptor.
+ */
+int
+sdb_client_sockfd(sdb_client_t *client);
+
/*
* sdb_client_close:
* Close the client connection.