summaryrefslogtreecommitdiff
path: root/src/ne_socket.h
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-03-26 15:44:28 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-03-26 15:44:28 +0000
commit2d2ce77acace36d2dd6e550227b0190d28da6303 (patch)
treecbdbd8e31824641f7c4c25d7656a50e7d40d671a /src/ne_socket.h
parentb454341a63ede6cb38779fe39d0a2a2d0fda73c8 (diff)
downloadneon-2d2ce77acace36d2dd6e550227b0190d28da6303.tar.gz
Add interface to set socket error string:
* src/ne_socket.c (ne_sock_set_error): New function. * src/ne_socket.h (ne_sock_set_error): New prototype. * test/socket.c (error): New test case. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1419 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_socket.h')
-rw-r--r--src/ne_socket.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ne_socket.h b/src/ne_socket.h
index 9895785..12092b0 100644
--- a/src/ne_socket.h
+++ b/src/ne_socket.h
@@ -207,6 +207,11 @@ int ne_sock_close(ne_socket *sock);
/* Return current error string for socket. */
const char *ne_sock_error(const ne_socket *sock);
+/* Set the error string for the socket; takes printf-like format
+ * string. */
+void ne_sock_set_error(ne_socket *sock, const char *format, ...)
+ ne_attribute((format (printf, 2, 3)));
+
/* Set read timeout for socket, in seconds; must be a non-zero
* positive integer. */
void ne_sock_read_timeout(ne_socket *sock, int timeout);