|
|
|
@ -34,17 +34,12 @@ |
|
|
|
|
#include <grpc/support/port_platform.h> |
|
|
|
|
#ifdef GPR_WINSOCK_SOCKET |
|
|
|
|
|
|
|
|
|
#include "src/core/iomgr/sockaddr.h" |
|
|
|
|
#include "src/core/iomgr/resolve_address.h" |
|
|
|
|
#include "src/core/iomgr/sockaddr.h" |
|
|
|
|
|
|
|
|
|
#include <sys/types.h> |
|
|
|
|
#include <string.h> |
|
|
|
|
#include <sys/types.h> |
|
|
|
|
|
|
|
|
|
#include "src/core/iomgr/executor.h" |
|
|
|
|
#include "src/core/iomgr/iomgr_internal.h" |
|
|
|
|
#include "src/core/iomgr/sockaddr_utils.h" |
|
|
|
|
#include "src/core/support/block_annotate.h" |
|
|
|
|
#include "src/core/support/string.h" |
|
|
|
|
#include <grpc/support/alloc.h> |
|
|
|
|
#include <grpc/support/host_port.h> |
|
|
|
|
#include <grpc/support/log.h> |
|
|
|
@ -52,6 +47,11 @@ |
|
|
|
|
#include <grpc/support/string_util.h> |
|
|
|
|
#include <grpc/support/thd.h> |
|
|
|
|
#include <grpc/support/time.h> |
|
|
|
|
#include "src/core/iomgr/executor.h" |
|
|
|
|
#include "src/core/iomgr/iomgr_internal.h" |
|
|
|
|
#include "src/core/iomgr/sockaddr_utils.h" |
|
|
|
|
#include "src/core/support/block_annotate.h" |
|
|
|
|
#include "src/core/support/string.h" |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
|
|
|
char *name; |
|
|
|
@ -61,7 +61,7 @@ typedef struct { |
|
|
|
|
void *arg; |
|
|
|
|
} request; |
|
|
|
|
|
|
|
|
|
grpc_resolved_addresses *grpc_blocking_resolve_address( |
|
|
|
|
static grpc_resolved_addresses *blocking_resolve_address_impl( |
|
|
|
|
const char *name, const char *default_port) { |
|
|
|
|
struct addrinfo hints; |
|
|
|
|
struct addrinfo *result = NULL, *resp; |
|
|
|
@ -133,6 +133,9 @@ done: |
|
|
|
|
return addrs; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
grpc_resolved_addresses *(*grpc_blocking_resolve_address)( |
|
|
|
|
const char *name, const char *default_port) = blocking_resolve_address_impl; |
|
|
|
|
|
|
|
|
|
/* Callback to be passed to grpc_executor to asynch-ify
|
|
|
|
|
* grpc_blocking_resolve_address */ |
|
|
|
|
static void do_request_thread(grpc_exec_ctx *exec_ctx, void *rp, bool success) { |
|
|
|
|