From fdfb68690f75a77a32d286e17a39e2543e07e58c Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 30 Jan 2016 00:49:18 +0100 Subject: Implement asynchronous name resolution * process.c (Fmake_network_process): Do asynchronous DNS lookups if we have getaddrinfo_a and the user requests :nowait. (check_for_dns): New function. (wait_reading_process_output): Check for pending name resolution in the idle loop. * process.h: Add structure for async DNS. --- src/process.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/process.h') diff --git a/src/process.h b/src/process.h index e2e6ca92984..684434c1748 100644 --- a/src/process.h +++ b/src/process.h @@ -161,14 +161,26 @@ struct Lisp_Process flag indicates that `raw_status' contains a new status that still needs to be synced to `status'. */ bool_bf raw_status_new : 1; + /* Whether this is a nonblocking socket. */ bool_bf is_non_blocking_client : 1; + /* Whether this is a server or a client socket. */ bool_bf is_server : 1; int raw_status; + /* The length of the socket backlog. */ int backlog; + /* The port number. */ int port; + /* The socket type. */ int socktype; + /* The socket protocol. */ int ai_protocol; +#ifdef HAVE_GETADDRINFO_A + /* Whether the socket is waiting for response from an asynchronous + DNS call. */ + struct gaicb* dns_request; +#endif + #ifdef HAVE_GNUTLS gnutls_initstage_t gnutls_initstage; gnutls_session_t gnutls_state; -- cgit v1.2.1