diff options
| author | Lars Ingebrigtsen | 2016-01-30 00:49:18 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-01-30 00:49:18 +0100 |
| commit | fdfb68690f75a77a32d286e17a39e2543e07e58c (patch) | |
| tree | 1b5d30b5e03e8196d179a6c8b3e2848b89a52f94 /src/process.h | |
| parent | 44e235dd88d3f506b31db24373c0f5d5fd27c79d (diff) | |
| download | emacs-fdfb68690f75a77a32d286e17a39e2543e07e58c.tar.gz emacs-fdfb68690f75a77a32d286e17a39e2543e07e58c.zip | |
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.
Diffstat (limited to 'src/process.h')
| -rw-r--r-- | src/process.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 | |||
| 161 | flag indicates that `raw_status' contains a new status that still | 161 | flag indicates that `raw_status' contains a new status that still |
| 162 | needs to be synced to `status'. */ | 162 | needs to be synced to `status'. */ |
| 163 | bool_bf raw_status_new : 1; | 163 | bool_bf raw_status_new : 1; |
| 164 | /* Whether this is a nonblocking socket. */ | ||
| 164 | bool_bf is_non_blocking_client : 1; | 165 | bool_bf is_non_blocking_client : 1; |
| 166 | /* Whether this is a server or a client socket. */ | ||
| 165 | bool_bf is_server : 1; | 167 | bool_bf is_server : 1; |
| 166 | int raw_status; | 168 | int raw_status; |
| 169 | /* The length of the socket backlog. */ | ||
| 167 | int backlog; | 170 | int backlog; |
| 171 | /* The port number. */ | ||
| 168 | int port; | 172 | int port; |
| 173 | /* The socket type. */ | ||
| 169 | int socktype; | 174 | int socktype; |
| 175 | /* The socket protocol. */ | ||
| 170 | int ai_protocol; | 176 | int ai_protocol; |
| 171 | 177 | ||
| 178 | #ifdef HAVE_GETADDRINFO_A | ||
| 179 | /* Whether the socket is waiting for response from an asynchronous | ||
| 180 | DNS call. */ | ||
| 181 | struct gaicb* dns_request; | ||
| 182 | #endif | ||
| 183 | |||
| 172 | #ifdef HAVE_GNUTLS | 184 | #ifdef HAVE_GNUTLS |
| 173 | gnutls_initstage_t gnutls_initstage; | 185 | gnutls_initstage_t gnutls_initstage; |
| 174 | gnutls_session_t gnutls_state; | 186 | gnutls_session_t gnutls_state; |