summaryrefslogtreecommitdiff
path: root/src/ne_private.h
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2006-12-28 23:12:18 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2006-12-28 23:12:18 +0000
commitaf39ed8edb53195eb3e533c0ce9ef9067d5b7737 (patch)
treec64cd0a69174b4cd2a6f4a3d44560dcd0085155c /src/ne_private.h
parent8f550276e15dc6ea3b682198dd0f5853e8348125 (diff)
downloadneon-af39ed8edb53195eb3e533c0ce9ef9067d5b7737.tar.gz
Add support for configurable socket connect timeouts:
* src/ne_socket.h (ne_sock_connect_timeout): New function. (ne_sock_connect): Clarify timeout handling. * src/ne_socket.c: Define USE_NONBLOCKING_CONNECT if appropriate. Define NE_ISINPROGRESS. (struct ne_socket_s): Add cotimeout field. (timed_connect): New function. (connect_socket): Renamed from raw_connect; use timed_connect; takes socket structure and sets ->error string on failure. (ne_sock_connect): Adapt to use connect_socket. (ne_sock_connect_timeout): New function. * src/ne_private.h (struct ne_session_s): Add cotimeout field. * src/ne_session.h (ne_set_connect_timeout): New prototype... * src/ne_session.c (ne_set_connect_timeout): ...implement it. * src/ne_request.c (do_connect): Set socket timeout if appropriate. * macros/neon.m4 (LIBNEON_SOURCE_CHECKS): Check for fcntl, getsockopt, fcntl.h and socklen_t. * test/socket.c (connect_timeout): Add test (disabled by default). git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1119 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_private.h')
-rw-r--r--src/ne_private.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ne_private.h b/src/ne_private.h
index 902d2d8..2ffe472 100644
--- a/src/ne_private.h
+++ b/src/ne_private.h
@@ -84,7 +84,7 @@ struct ne_session_s {
ne_notify_status notify_cb;
void *notify_ud;
- int rdtimeout; /* read timeout. */
+ int rdtimeout, cotimeout; /* read, connect timeouts. */
struct hook *create_req_hooks, *pre_send_hooks, *post_send_hooks,
*post_headers_hooks, *destroy_req_hooks, *destroy_sess_hooks, *private;