Delete libuv-iomgr implementation and GRPC_UV build option (#27188)
This has been unmaintained for years, last supported in gRPC-core v1.24.
This commit is contained in:
parent
6f48ba4d94
commit
2d16865693
10
BUILD
10
BUILD
|
|
@ -1234,7 +1234,6 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/endpoint_cfstream.cc",
|
||||
"src/core/lib/iomgr/endpoint_pair_event_engine.cc",
|
||||
"src/core/lib/iomgr/endpoint_pair_posix.cc",
|
||||
"src/core/lib/iomgr/endpoint_pair_uv.cc",
|
||||
"src/core/lib/iomgr/endpoint_pair_windows.cc",
|
||||
"src/core/lib/iomgr/error.cc",
|
||||
"src/core/lib/iomgr/error_cfstream.cc",
|
||||
|
|
@ -1270,7 +1269,6 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/iomgr_internal.cc",
|
||||
"src/core/lib/iomgr/iomgr_posix.cc",
|
||||
"src/core/lib/iomgr/iomgr_posix_cfstream.cc",
|
||||
"src/core/lib/iomgr/iomgr_uv.cc",
|
||||
"src/core/lib/iomgr/iomgr_windows.cc",
|
||||
"src/core/lib/iomgr/is_epollexclusive_available.cc",
|
||||
"src/core/lib/iomgr/load_file.cc",
|
||||
|
|
@ -1281,7 +1279,6 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/pollset_set.cc",
|
||||
"src/core/lib/iomgr/pollset_set_custom.cc",
|
||||
"src/core/lib/iomgr/pollset_set_windows.cc",
|
||||
"src/core/lib/iomgr/pollset_uv.cc",
|
||||
"src/core/lib/iomgr/pollset_windows.cc",
|
||||
"src/core/lib/iomgr/resolve_address.cc",
|
||||
"src/core/lib/iomgr/resolve_address_custom.cc",
|
||||
|
|
@ -1293,7 +1290,6 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/socket_utils_common_posix.cc",
|
||||
"src/core/lib/iomgr/socket_utils_linux.cc",
|
||||
"src/core/lib/iomgr/socket_utils_posix.cc",
|
||||
"src/core/lib/iomgr/socket_utils_uv.cc",
|
||||
"src/core/lib/iomgr/socket_utils_windows.cc",
|
||||
"src/core/lib/iomgr/socket_windows.cc",
|
||||
"src/core/lib/iomgr/tcp_client.cc",
|
||||
|
|
@ -1310,7 +1306,6 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc",
|
||||
"src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc",
|
||||
"src/core/lib/iomgr/tcp_server_windows.cc",
|
||||
"src/core/lib/iomgr/tcp_uv.cc",
|
||||
"src/core/lib/iomgr/tcp_windows.cc",
|
||||
"src/core/lib/iomgr/time_averaged_stats.cc",
|
||||
"src/core/lib/iomgr/timer.cc",
|
||||
|
|
@ -1318,7 +1313,6 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/timer_generic.cc",
|
||||
"src/core/lib/iomgr/timer_heap.cc",
|
||||
"src/core/lib/iomgr/timer_manager.cc",
|
||||
"src/core/lib/iomgr/timer_uv.cc",
|
||||
"src/core/lib/iomgr/udp_server.cc",
|
||||
"src/core/lib/iomgr/unix_sockets_posix.cc",
|
||||
"src/core/lib/iomgr/unix_sockets_posix_noop.cc",
|
||||
|
|
@ -1446,7 +1440,6 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/pollset_set.h",
|
||||
"src/core/lib/iomgr/pollset_set_custom.h",
|
||||
"src/core/lib/iomgr/pollset_set_windows.h",
|
||||
"src/core/lib/iomgr/pollset_uv.h",
|
||||
"src/core/lib/iomgr/pollset_windows.h",
|
||||
"src/core/lib/iomgr/port.h",
|
||||
"src/core/lib/iomgr/python_util.h",
|
||||
|
|
@ -1454,7 +1447,6 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/resolve_address_custom.h",
|
||||
"src/core/lib/iomgr/resource_quota.h",
|
||||
"src/core/lib/iomgr/sockaddr.h",
|
||||
"src/core/lib/iomgr/sockaddr_custom.h",
|
||||
"src/core/lib/iomgr/sockaddr_posix.h",
|
||||
"src/core/lib/iomgr/sockaddr_windows.h",
|
||||
"src/core/lib/iomgr/socket_factory_posix.h",
|
||||
|
|
@ -2443,12 +2435,10 @@ grpc_cc_library(
|
|||
srcs = [
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc",
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc",
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc",
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc",
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc",
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc",
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc",
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc",
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc",
|
||||
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc",
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1590,12 +1590,10 @@ add_library(grpc
|
|||
src/core/ext/filters/client_channel/resolver.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc
|
||||
|
|
@ -1901,7 +1899,6 @@ add_library(grpc
|
|||
src/core/lib/iomgr/endpoint_cfstream.cc
|
||||
src/core/lib/iomgr/endpoint_pair_event_engine.cc
|
||||
src/core/lib/iomgr/endpoint_pair_posix.cc
|
||||
src/core/lib/iomgr/endpoint_pair_uv.cc
|
||||
src/core/lib/iomgr/endpoint_pair_windows.cc
|
||||
src/core/lib/iomgr/error.cc
|
||||
src/core/lib/iomgr/error_cfstream.cc
|
||||
|
|
@ -1937,7 +1934,6 @@ add_library(grpc
|
|||
src/core/lib/iomgr/iomgr_internal.cc
|
||||
src/core/lib/iomgr/iomgr_posix.cc
|
||||
src/core/lib/iomgr/iomgr_posix_cfstream.cc
|
||||
src/core/lib/iomgr/iomgr_uv.cc
|
||||
src/core/lib/iomgr/iomgr_windows.cc
|
||||
src/core/lib/iomgr/is_epollexclusive_available.cc
|
||||
src/core/lib/iomgr/load_file.cc
|
||||
|
|
@ -1948,7 +1944,6 @@ add_library(grpc
|
|||
src/core/lib/iomgr/pollset_set.cc
|
||||
src/core/lib/iomgr/pollset_set_custom.cc
|
||||
src/core/lib/iomgr/pollset_set_windows.cc
|
||||
src/core/lib/iomgr/pollset_uv.cc
|
||||
src/core/lib/iomgr/pollset_windows.cc
|
||||
src/core/lib/iomgr/resolve_address.cc
|
||||
src/core/lib/iomgr/resolve_address_custom.cc
|
||||
|
|
@ -1960,7 +1955,6 @@ add_library(grpc
|
|||
src/core/lib/iomgr/socket_utils_common_posix.cc
|
||||
src/core/lib/iomgr/socket_utils_linux.cc
|
||||
src/core/lib/iomgr/socket_utils_posix.cc
|
||||
src/core/lib/iomgr/socket_utils_uv.cc
|
||||
src/core/lib/iomgr/socket_utils_windows.cc
|
||||
src/core/lib/iomgr/socket_windows.cc
|
||||
src/core/lib/iomgr/tcp_client.cc
|
||||
|
|
@ -1977,7 +1971,6 @@ add_library(grpc
|
|||
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
|
||||
src/core/lib/iomgr/tcp_server_windows.cc
|
||||
src/core/lib/iomgr/tcp_uv.cc
|
||||
src/core/lib/iomgr/tcp_windows.cc
|
||||
src/core/lib/iomgr/time_averaged_stats.cc
|
||||
src/core/lib/iomgr/timer.cc
|
||||
|
|
@ -1985,7 +1978,6 @@ add_library(grpc
|
|||
src/core/lib/iomgr/timer_generic.cc
|
||||
src/core/lib/iomgr/timer_heap.cc
|
||||
src/core/lib/iomgr/timer_manager.cc
|
||||
src/core/lib/iomgr/timer_uv.cc
|
||||
src/core/lib/iomgr/udp_server.cc
|
||||
src/core/lib/iomgr/unix_sockets_posix.cc
|
||||
src/core/lib/iomgr/unix_sockets_posix_noop.cc
|
||||
|
|
@ -2427,12 +2419,10 @@ add_library(grpc_unsecure
|
|||
src/core/ext/filters/client_channel/resolver.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc
|
||||
src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc
|
||||
|
|
@ -2542,7 +2532,6 @@ add_library(grpc_unsecure
|
|||
src/core/lib/iomgr/endpoint_cfstream.cc
|
||||
src/core/lib/iomgr/endpoint_pair_event_engine.cc
|
||||
src/core/lib/iomgr/endpoint_pair_posix.cc
|
||||
src/core/lib/iomgr/endpoint_pair_uv.cc
|
||||
src/core/lib/iomgr/endpoint_pair_windows.cc
|
||||
src/core/lib/iomgr/error.cc
|
||||
src/core/lib/iomgr/error_cfstream.cc
|
||||
|
|
@ -2578,7 +2567,6 @@ add_library(grpc_unsecure
|
|||
src/core/lib/iomgr/iomgr_internal.cc
|
||||
src/core/lib/iomgr/iomgr_posix.cc
|
||||
src/core/lib/iomgr/iomgr_posix_cfstream.cc
|
||||
src/core/lib/iomgr/iomgr_uv.cc
|
||||
src/core/lib/iomgr/iomgr_windows.cc
|
||||
src/core/lib/iomgr/is_epollexclusive_available.cc
|
||||
src/core/lib/iomgr/load_file.cc
|
||||
|
|
@ -2589,7 +2577,6 @@ add_library(grpc_unsecure
|
|||
src/core/lib/iomgr/pollset_set.cc
|
||||
src/core/lib/iomgr/pollset_set_custom.cc
|
||||
src/core/lib/iomgr/pollset_set_windows.cc
|
||||
src/core/lib/iomgr/pollset_uv.cc
|
||||
src/core/lib/iomgr/pollset_windows.cc
|
||||
src/core/lib/iomgr/resolve_address.cc
|
||||
src/core/lib/iomgr/resolve_address_custom.cc
|
||||
|
|
@ -2601,7 +2588,6 @@ add_library(grpc_unsecure
|
|||
src/core/lib/iomgr/socket_utils_common_posix.cc
|
||||
src/core/lib/iomgr/socket_utils_linux.cc
|
||||
src/core/lib/iomgr/socket_utils_posix.cc
|
||||
src/core/lib/iomgr/socket_utils_uv.cc
|
||||
src/core/lib/iomgr/socket_utils_windows.cc
|
||||
src/core/lib/iomgr/socket_windows.cc
|
||||
src/core/lib/iomgr/tcp_client.cc
|
||||
|
|
@ -2618,7 +2604,6 @@ add_library(grpc_unsecure
|
|||
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
|
||||
src/core/lib/iomgr/tcp_server_windows.cc
|
||||
src/core/lib/iomgr/tcp_uv.cc
|
||||
src/core/lib/iomgr/tcp_windows.cc
|
||||
src/core/lib/iomgr/time_averaged_stats.cc
|
||||
src/core/lib/iomgr/timer.cc
|
||||
|
|
@ -2626,7 +2611,6 @@ add_library(grpc_unsecure
|
|||
src/core/lib/iomgr/timer_generic.cc
|
||||
src/core/lib/iomgr/timer_heap.cc
|
||||
src/core/lib/iomgr/timer_manager.cc
|
||||
src/core/lib/iomgr/timer_uv.cc
|
||||
src/core/lib/iomgr/udp_server.cc
|
||||
src/core/lib/iomgr/unix_sockets_posix.cc
|
||||
src/core/lib/iomgr/unix_sockets_posix_noop.cc
|
||||
|
|
|
|||
|
|
@ -1083,12 +1083,10 @@ LIBGRPC_SRC = \
|
|||
src/core/ext/filters/client_channel/resolver.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc \
|
||||
|
|
@ -1394,7 +1392,6 @@ LIBGRPC_SRC = \
|
|||
src/core/lib/iomgr/endpoint_cfstream.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_event_engine.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_posix.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_uv.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_windows.cc \
|
||||
src/core/lib/iomgr/error.cc \
|
||||
src/core/lib/iomgr/error_cfstream.cc \
|
||||
|
|
@ -1430,7 +1427,6 @@ LIBGRPC_SRC = \
|
|||
src/core/lib/iomgr/iomgr_internal.cc \
|
||||
src/core/lib/iomgr/iomgr_posix.cc \
|
||||
src/core/lib/iomgr/iomgr_posix_cfstream.cc \
|
||||
src/core/lib/iomgr/iomgr_uv.cc \
|
||||
src/core/lib/iomgr/iomgr_windows.cc \
|
||||
src/core/lib/iomgr/is_epollexclusive_available.cc \
|
||||
src/core/lib/iomgr/load_file.cc \
|
||||
|
|
@ -1441,7 +1437,6 @@ LIBGRPC_SRC = \
|
|||
src/core/lib/iomgr/pollset_set.cc \
|
||||
src/core/lib/iomgr/pollset_set_custom.cc \
|
||||
src/core/lib/iomgr/pollset_set_windows.cc \
|
||||
src/core/lib/iomgr/pollset_uv.cc \
|
||||
src/core/lib/iomgr/pollset_windows.cc \
|
||||
src/core/lib/iomgr/resolve_address.cc \
|
||||
src/core/lib/iomgr/resolve_address_custom.cc \
|
||||
|
|
@ -1453,7 +1448,6 @@ LIBGRPC_SRC = \
|
|||
src/core/lib/iomgr/socket_utils_common_posix.cc \
|
||||
src/core/lib/iomgr/socket_utils_linux.cc \
|
||||
src/core/lib/iomgr/socket_utils_posix.cc \
|
||||
src/core/lib/iomgr/socket_utils_uv.cc \
|
||||
src/core/lib/iomgr/socket_utils_windows.cc \
|
||||
src/core/lib/iomgr/socket_windows.cc \
|
||||
src/core/lib/iomgr/tcp_client.cc \
|
||||
|
|
@ -1470,7 +1464,6 @@ LIBGRPC_SRC = \
|
|||
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_windows.cc \
|
||||
src/core/lib/iomgr/tcp_uv.cc \
|
||||
src/core/lib/iomgr/tcp_windows.cc \
|
||||
src/core/lib/iomgr/time_averaged_stats.cc \
|
||||
src/core/lib/iomgr/timer.cc \
|
||||
|
|
@ -1478,7 +1471,6 @@ LIBGRPC_SRC = \
|
|||
src/core/lib/iomgr/timer_generic.cc \
|
||||
src/core/lib/iomgr/timer_heap.cc \
|
||||
src/core/lib/iomgr/timer_manager.cc \
|
||||
src/core/lib/iomgr/timer_uv.cc \
|
||||
src/core/lib/iomgr/udp_server.cc \
|
||||
src/core/lib/iomgr/unix_sockets_posix.cc \
|
||||
src/core/lib/iomgr/unix_sockets_posix_noop.cc \
|
||||
|
|
@ -1768,12 +1760,10 @@ LIBGRPC_UNSECURE_SRC = \
|
|||
src/core/ext/filters/client_channel/resolver.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc \
|
||||
|
|
@ -1883,7 +1873,6 @@ LIBGRPC_UNSECURE_SRC = \
|
|||
src/core/lib/iomgr/endpoint_cfstream.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_event_engine.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_posix.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_uv.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_windows.cc \
|
||||
src/core/lib/iomgr/error.cc \
|
||||
src/core/lib/iomgr/error_cfstream.cc \
|
||||
|
|
@ -1919,7 +1908,6 @@ LIBGRPC_UNSECURE_SRC = \
|
|||
src/core/lib/iomgr/iomgr_internal.cc \
|
||||
src/core/lib/iomgr/iomgr_posix.cc \
|
||||
src/core/lib/iomgr/iomgr_posix_cfstream.cc \
|
||||
src/core/lib/iomgr/iomgr_uv.cc \
|
||||
src/core/lib/iomgr/iomgr_windows.cc \
|
||||
src/core/lib/iomgr/is_epollexclusive_available.cc \
|
||||
src/core/lib/iomgr/load_file.cc \
|
||||
|
|
@ -1930,7 +1918,6 @@ LIBGRPC_UNSECURE_SRC = \
|
|||
src/core/lib/iomgr/pollset_set.cc \
|
||||
src/core/lib/iomgr/pollset_set_custom.cc \
|
||||
src/core/lib/iomgr/pollset_set_windows.cc \
|
||||
src/core/lib/iomgr/pollset_uv.cc \
|
||||
src/core/lib/iomgr/pollset_windows.cc \
|
||||
src/core/lib/iomgr/resolve_address.cc \
|
||||
src/core/lib/iomgr/resolve_address_custom.cc \
|
||||
|
|
@ -1942,7 +1929,6 @@ LIBGRPC_UNSECURE_SRC = \
|
|||
src/core/lib/iomgr/socket_utils_common_posix.cc \
|
||||
src/core/lib/iomgr/socket_utils_linux.cc \
|
||||
src/core/lib/iomgr/socket_utils_posix.cc \
|
||||
src/core/lib/iomgr/socket_utils_uv.cc \
|
||||
src/core/lib/iomgr/socket_utils_windows.cc \
|
||||
src/core/lib/iomgr/socket_windows.cc \
|
||||
src/core/lib/iomgr/tcp_client.cc \
|
||||
|
|
@ -1959,7 +1945,6 @@ LIBGRPC_UNSECURE_SRC = \
|
|||
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_windows.cc \
|
||||
src/core/lib/iomgr/tcp_uv.cc \
|
||||
src/core/lib/iomgr/tcp_windows.cc \
|
||||
src/core/lib/iomgr/time_averaged_stats.cc \
|
||||
src/core/lib/iomgr/timer.cc \
|
||||
|
|
@ -1967,7 +1952,6 @@ LIBGRPC_UNSECURE_SRC = \
|
|||
src/core/lib/iomgr/timer_generic.cc \
|
||||
src/core/lib/iomgr/timer_heap.cc \
|
||||
src/core/lib/iomgr/timer_manager.cc \
|
||||
src/core/lib/iomgr/timer_uv.cc \
|
||||
src/core/lib/iomgr/udp_server.cc \
|
||||
src/core/lib/iomgr/unix_sockets_posix.cc \
|
||||
src/core/lib/iomgr/unix_sockets_posix_noop.cc \
|
||||
|
|
|
|||
|
|
@ -804,7 +804,6 @@ libs:
|
|||
- src/core/lib/iomgr/pollset_set.h
|
||||
- src/core/lib/iomgr/pollset_set_custom.h
|
||||
- src/core/lib/iomgr/pollset_set_windows.h
|
||||
- src/core/lib/iomgr/pollset_uv.h
|
||||
- src/core/lib/iomgr/pollset_windows.h
|
||||
- src/core/lib/iomgr/port.h
|
||||
- src/core/lib/iomgr/python_util.h
|
||||
|
|
@ -812,7 +811,6 @@ libs:
|
|||
- src/core/lib/iomgr/resolve_address_custom.h
|
||||
- src/core/lib/iomgr/resource_quota.h
|
||||
- src/core/lib/iomgr/sockaddr.h
|
||||
- src/core/lib/iomgr/sockaddr_custom.h
|
||||
- src/core/lib/iomgr/sockaddr_posix.h
|
||||
- src/core/lib/iomgr/sockaddr_windows.h
|
||||
- src/core/lib/iomgr/socket_factory_posix.h
|
||||
|
|
@ -990,12 +988,10 @@ libs:
|
|||
- src/core/ext/filters/client_channel/resolver.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc
|
||||
|
|
@ -1301,7 +1297,6 @@ libs:
|
|||
- src/core/lib/iomgr/endpoint_cfstream.cc
|
||||
- src/core/lib/iomgr/endpoint_pair_event_engine.cc
|
||||
- src/core/lib/iomgr/endpoint_pair_posix.cc
|
||||
- src/core/lib/iomgr/endpoint_pair_uv.cc
|
||||
- src/core/lib/iomgr/endpoint_pair_windows.cc
|
||||
- src/core/lib/iomgr/error.cc
|
||||
- src/core/lib/iomgr/error_cfstream.cc
|
||||
|
|
@ -1337,7 +1332,6 @@ libs:
|
|||
- src/core/lib/iomgr/iomgr_internal.cc
|
||||
- src/core/lib/iomgr/iomgr_posix.cc
|
||||
- src/core/lib/iomgr/iomgr_posix_cfstream.cc
|
||||
- src/core/lib/iomgr/iomgr_uv.cc
|
||||
- src/core/lib/iomgr/iomgr_windows.cc
|
||||
- src/core/lib/iomgr/is_epollexclusive_available.cc
|
||||
- src/core/lib/iomgr/load_file.cc
|
||||
|
|
@ -1348,7 +1342,6 @@ libs:
|
|||
- src/core/lib/iomgr/pollset_set.cc
|
||||
- src/core/lib/iomgr/pollset_set_custom.cc
|
||||
- src/core/lib/iomgr/pollset_set_windows.cc
|
||||
- src/core/lib/iomgr/pollset_uv.cc
|
||||
- src/core/lib/iomgr/pollset_windows.cc
|
||||
- src/core/lib/iomgr/resolve_address.cc
|
||||
- src/core/lib/iomgr/resolve_address_custom.cc
|
||||
|
|
@ -1360,7 +1353,6 @@ libs:
|
|||
- src/core/lib/iomgr/socket_utils_common_posix.cc
|
||||
- src/core/lib/iomgr/socket_utils_linux.cc
|
||||
- src/core/lib/iomgr/socket_utils_posix.cc
|
||||
- src/core/lib/iomgr/socket_utils_uv.cc
|
||||
- src/core/lib/iomgr/socket_utils_windows.cc
|
||||
- src/core/lib/iomgr/socket_windows.cc
|
||||
- src/core/lib/iomgr/tcp_client.cc
|
||||
|
|
@ -1377,7 +1369,6 @@ libs:
|
|||
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
|
||||
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
|
||||
- src/core/lib/iomgr/tcp_server_windows.cc
|
||||
- src/core/lib/iomgr/tcp_uv.cc
|
||||
- src/core/lib/iomgr/tcp_windows.cc
|
||||
- src/core/lib/iomgr/time_averaged_stats.cc
|
||||
- src/core/lib/iomgr/timer.cc
|
||||
|
|
@ -1385,7 +1376,6 @@ libs:
|
|||
- src/core/lib/iomgr/timer_generic.cc
|
||||
- src/core/lib/iomgr/timer_heap.cc
|
||||
- src/core/lib/iomgr/timer_manager.cc
|
||||
- src/core/lib/iomgr/timer_uv.cc
|
||||
- src/core/lib/iomgr/udp_server.cc
|
||||
- src/core/lib/iomgr/unix_sockets_posix.cc
|
||||
- src/core/lib/iomgr/unix_sockets_posix_noop.cc
|
||||
|
|
@ -1853,7 +1843,6 @@ libs:
|
|||
- src/core/lib/iomgr/pollset_set.h
|
||||
- src/core/lib/iomgr/pollset_set_custom.h
|
||||
- src/core/lib/iomgr/pollset_set_windows.h
|
||||
- src/core/lib/iomgr/pollset_uv.h
|
||||
- src/core/lib/iomgr/pollset_windows.h
|
||||
- src/core/lib/iomgr/port.h
|
||||
- src/core/lib/iomgr/python_util.h
|
||||
|
|
@ -1861,7 +1850,6 @@ libs:
|
|||
- src/core/lib/iomgr/resolve_address_custom.h
|
||||
- src/core/lib/iomgr/resource_quota.h
|
||||
- src/core/lib/iomgr/sockaddr.h
|
||||
- src/core/lib/iomgr/sockaddr_custom.h
|
||||
- src/core/lib/iomgr/sockaddr_posix.h
|
||||
- src/core/lib/iomgr/sockaddr_windows.h
|
||||
- src/core/lib/iomgr/socket_factory_posix.h
|
||||
|
|
@ -1960,12 +1948,10 @@ libs:
|
|||
- src/core/ext/filters/client_channel/resolver.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc
|
||||
- src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc
|
||||
|
|
@ -2075,7 +2061,6 @@ libs:
|
|||
- src/core/lib/iomgr/endpoint_cfstream.cc
|
||||
- src/core/lib/iomgr/endpoint_pair_event_engine.cc
|
||||
- src/core/lib/iomgr/endpoint_pair_posix.cc
|
||||
- src/core/lib/iomgr/endpoint_pair_uv.cc
|
||||
- src/core/lib/iomgr/endpoint_pair_windows.cc
|
||||
- src/core/lib/iomgr/error.cc
|
||||
- src/core/lib/iomgr/error_cfstream.cc
|
||||
|
|
@ -2111,7 +2096,6 @@ libs:
|
|||
- src/core/lib/iomgr/iomgr_internal.cc
|
||||
- src/core/lib/iomgr/iomgr_posix.cc
|
||||
- src/core/lib/iomgr/iomgr_posix_cfstream.cc
|
||||
- src/core/lib/iomgr/iomgr_uv.cc
|
||||
- src/core/lib/iomgr/iomgr_windows.cc
|
||||
- src/core/lib/iomgr/is_epollexclusive_available.cc
|
||||
- src/core/lib/iomgr/load_file.cc
|
||||
|
|
@ -2122,7 +2106,6 @@ libs:
|
|||
- src/core/lib/iomgr/pollset_set.cc
|
||||
- src/core/lib/iomgr/pollset_set_custom.cc
|
||||
- src/core/lib/iomgr/pollset_set_windows.cc
|
||||
- src/core/lib/iomgr/pollset_uv.cc
|
||||
- src/core/lib/iomgr/pollset_windows.cc
|
||||
- src/core/lib/iomgr/resolve_address.cc
|
||||
- src/core/lib/iomgr/resolve_address_custom.cc
|
||||
|
|
@ -2134,7 +2117,6 @@ libs:
|
|||
- src/core/lib/iomgr/socket_utils_common_posix.cc
|
||||
- src/core/lib/iomgr/socket_utils_linux.cc
|
||||
- src/core/lib/iomgr/socket_utils_posix.cc
|
||||
- src/core/lib/iomgr/socket_utils_uv.cc
|
||||
- src/core/lib/iomgr/socket_utils_windows.cc
|
||||
- src/core/lib/iomgr/socket_windows.cc
|
||||
- src/core/lib/iomgr/tcp_client.cc
|
||||
|
|
@ -2151,7 +2133,6 @@ libs:
|
|||
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
|
||||
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
|
||||
- src/core/lib/iomgr/tcp_server_windows.cc
|
||||
- src/core/lib/iomgr/tcp_uv.cc
|
||||
- src/core/lib/iomgr/tcp_windows.cc
|
||||
- src/core/lib/iomgr/time_averaged_stats.cc
|
||||
- src/core/lib/iomgr/timer.cc
|
||||
|
|
@ -2159,7 +2140,6 @@ libs:
|
|||
- src/core/lib/iomgr/timer_generic.cc
|
||||
- src/core/lib/iomgr/timer_heap.cc
|
||||
- src/core/lib/iomgr/timer_manager.cc
|
||||
- src/core/lib/iomgr/timer_uv.cc
|
||||
- src/core/lib/iomgr/udp_server.cc
|
||||
- src/core/lib/iomgr/unix_sockets_posix.cc
|
||||
- src/core/lib/iomgr/unix_sockets_posix_noop.cc
|
||||
|
|
|
|||
|
|
@ -78,12 +78,10 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/ext/filters/client_channel/resolver.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc \
|
||||
|
|
@ -445,7 +443,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/iomgr/endpoint_cfstream.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_event_engine.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_posix.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_uv.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_windows.cc \
|
||||
src/core/lib/iomgr/error.cc \
|
||||
src/core/lib/iomgr/error_cfstream.cc \
|
||||
|
|
@ -481,7 +478,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/iomgr/iomgr_internal.cc \
|
||||
src/core/lib/iomgr/iomgr_posix.cc \
|
||||
src/core/lib/iomgr/iomgr_posix_cfstream.cc \
|
||||
src/core/lib/iomgr/iomgr_uv.cc \
|
||||
src/core/lib/iomgr/iomgr_windows.cc \
|
||||
src/core/lib/iomgr/is_epollexclusive_available.cc \
|
||||
src/core/lib/iomgr/load_file.cc \
|
||||
|
|
@ -492,7 +488,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/iomgr/pollset_set.cc \
|
||||
src/core/lib/iomgr/pollset_set_custom.cc \
|
||||
src/core/lib/iomgr/pollset_set_windows.cc \
|
||||
src/core/lib/iomgr/pollset_uv.cc \
|
||||
src/core/lib/iomgr/pollset_windows.cc \
|
||||
src/core/lib/iomgr/resolve_address.cc \
|
||||
src/core/lib/iomgr/resolve_address_custom.cc \
|
||||
|
|
@ -504,7 +499,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/iomgr/socket_utils_common_posix.cc \
|
||||
src/core/lib/iomgr/socket_utils_linux.cc \
|
||||
src/core/lib/iomgr/socket_utils_posix.cc \
|
||||
src/core/lib/iomgr/socket_utils_uv.cc \
|
||||
src/core/lib/iomgr/socket_utils_windows.cc \
|
||||
src/core/lib/iomgr/socket_windows.cc \
|
||||
src/core/lib/iomgr/tcp_client.cc \
|
||||
|
|
@ -521,7 +515,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_windows.cc \
|
||||
src/core/lib/iomgr/tcp_uv.cc \
|
||||
src/core/lib/iomgr/tcp_windows.cc \
|
||||
src/core/lib/iomgr/time_averaged_stats.cc \
|
||||
src/core/lib/iomgr/timer.cc \
|
||||
|
|
@ -529,7 +522,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/iomgr/timer_generic.cc \
|
||||
src/core/lib/iomgr/timer_heap.cc \
|
||||
src/core/lib/iomgr/timer_manager.cc \
|
||||
src/core/lib/iomgr/timer_uv.cc \
|
||||
src/core/lib/iomgr/udp_server.cc \
|
||||
src/core/lib/iomgr/unix_sockets_posix.cc \
|
||||
src/core/lib/iomgr/unix_sockets_posix_noop.cc \
|
||||
|
|
|
|||
|
|
@ -44,12 +44,10 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\ext\\filters\\client_channel\\resolver.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\dns_resolver_ares.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_ev_driver_event_engine.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_ev_driver_libuv.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_ev_driver_posix.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_ev_driver_windows.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper_event_engine.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper_libuv.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper_posix.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper_windows.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\dns_resolver_selection.cc " +
|
||||
|
|
@ -411,7 +409,6 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\iomgr\\endpoint_cfstream.cc " +
|
||||
"src\\core\\lib\\iomgr\\endpoint_pair_event_engine.cc " +
|
||||
"src\\core\\lib\\iomgr\\endpoint_pair_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\endpoint_pair_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\endpoint_pair_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\error.cc " +
|
||||
"src\\core\\lib\\iomgr\\error_cfstream.cc " +
|
||||
|
|
@ -447,7 +444,6 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\iomgr\\iomgr_internal.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr_posix_cfstream.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\is_epollexclusive_available.cc " +
|
||||
"src\\core\\lib\\iomgr\\load_file.cc " +
|
||||
|
|
@ -458,7 +454,6 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\iomgr\\pollset_set.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_set_custom.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_set_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\resolve_address.cc " +
|
||||
"src\\core\\lib\\iomgr\\resolve_address_custom.cc " +
|
||||
|
|
@ -470,7 +465,6 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\iomgr\\socket_utils_common_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\socket_utils_linux.cc " +
|
||||
"src\\core\\lib\\iomgr\\socket_utils_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\socket_utils_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\socket_utils_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\socket_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_client.cc " +
|
||||
|
|
@ -487,7 +481,6 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\iomgr\\tcp_server_utils_posix_ifaddrs.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server_utils_posix_noifaddrs.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\time_averaged_stats.cc " +
|
||||
"src\\core\\lib\\iomgr\\timer.cc " +
|
||||
|
|
@ -495,7 +488,6 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\iomgr\\timer_generic.cc " +
|
||||
"src\\core\\lib\\iomgr\\timer_heap.cc " +
|
||||
"src\\core\\lib\\iomgr\\timer_manager.cc " +
|
||||
"src\\core\\lib\\iomgr\\timer_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\udp_server.cc " +
|
||||
"src\\core\\lib\\iomgr\\unix_sockets_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\unix_sockets_posix_noop.cc " +
|
||||
|
|
|
|||
|
|
@ -617,7 +617,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/pollset_set.h',
|
||||
'src/core/lib/iomgr/pollset_set_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set_windows.h',
|
||||
'src/core/lib/iomgr/pollset_uv.h',
|
||||
'src/core/lib/iomgr/pollset_windows.h',
|
||||
'src/core/lib/iomgr/port.h',
|
||||
'src/core/lib/iomgr/python_util.h',
|
||||
|
|
@ -625,7 +624,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/resolve_address_custom.h',
|
||||
'src/core/lib/iomgr/resource_quota.h',
|
||||
'src/core/lib/iomgr/sockaddr.h',
|
||||
'src/core/lib/iomgr/sockaddr_custom.h',
|
||||
'src/core/lib/iomgr/sockaddr_posix.h',
|
||||
'src/core/lib/iomgr/sockaddr_windows.h',
|
||||
'src/core/lib/iomgr/socket_factory_posix.h',
|
||||
|
|
@ -1283,7 +1281,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/pollset_set.h',
|
||||
'src/core/lib/iomgr/pollset_set_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set_windows.h',
|
||||
'src/core/lib/iomgr/pollset_uv.h',
|
||||
'src/core/lib/iomgr/pollset_windows.h',
|
||||
'src/core/lib/iomgr/port.h',
|
||||
'src/core/lib/iomgr/python_util.h',
|
||||
|
|
@ -1291,7 +1288,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/resolve_address_custom.h',
|
||||
'src/core/lib/iomgr/resource_quota.h',
|
||||
'src/core/lib/iomgr/sockaddr.h',
|
||||
'src/core/lib/iomgr/sockaddr_custom.h',
|
||||
'src/core/lib/iomgr/sockaddr_posix.h',
|
||||
'src/core/lib/iomgr/sockaddr_windows.h',
|
||||
'src/core/lib/iomgr/socket_factory_posix.h',
|
||||
|
|
|
|||
|
|
@ -265,13 +265,11 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc',
|
||||
|
|
@ -978,7 +976,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/endpoint_pair.h',
|
||||
'src/core/lib/iomgr/endpoint_pair_event_engine.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_posix.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_uv.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_windows.cc',
|
||||
'src/core/lib/iomgr/error.cc',
|
||||
'src/core/lib/iomgr/error.h',
|
||||
|
|
@ -1039,7 +1036,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/iomgr_internal.h',
|
||||
'src/core/lib/iomgr/iomgr_posix.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix_cfstream.cc',
|
||||
'src/core/lib/iomgr/iomgr_uv.cc',
|
||||
'src/core/lib/iomgr/iomgr_windows.cc',
|
||||
'src/core/lib/iomgr/is_epollexclusive_available.cc',
|
||||
'src/core/lib/iomgr/is_epollexclusive_available.h',
|
||||
|
|
@ -1060,8 +1056,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/pollset_set_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_set_windows.h',
|
||||
'src/core/lib/iomgr/pollset_uv.cc',
|
||||
'src/core/lib/iomgr/pollset_uv.h',
|
||||
'src/core/lib/iomgr/pollset_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_windows.h',
|
||||
'src/core/lib/iomgr/port.h',
|
||||
|
|
@ -1075,7 +1069,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/resource_quota.cc',
|
||||
'src/core/lib/iomgr/resource_quota.h',
|
||||
'src/core/lib/iomgr/sockaddr.h',
|
||||
'src/core/lib/iomgr/sockaddr_custom.h',
|
||||
'src/core/lib/iomgr/sockaddr_posix.h',
|
||||
'src/core/lib/iomgr/sockaddr_windows.h',
|
||||
'src/core/lib/iomgr/socket_factory_posix.cc',
|
||||
|
|
@ -1087,7 +1080,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/socket_utils_linux.cc',
|
||||
'src/core/lib/iomgr/socket_utils_posix.cc',
|
||||
'src/core/lib/iomgr/socket_utils_posix.h',
|
||||
'src/core/lib/iomgr/socket_utils_uv.cc',
|
||||
'src/core/lib/iomgr/socket_utils_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.h',
|
||||
|
|
@ -1112,7 +1104,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.h',
|
||||
'src/core/lib/iomgr/time_averaged_stats.cc',
|
||||
|
|
@ -1127,7 +1118,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/timer_heap.h',
|
||||
'src/core/lib/iomgr/timer_manager.cc',
|
||||
'src/core/lib/iomgr/timer_manager.h',
|
||||
'src/core/lib/iomgr/timer_uv.cc',
|
||||
'src/core/lib/iomgr/udp_server.cc',
|
||||
'src/core/lib/iomgr/udp_server.h',
|
||||
'src/core/lib/iomgr/unix_sockets_posix.cc',
|
||||
|
|
@ -1872,7 +1862,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/pollset_set.h',
|
||||
'src/core/lib/iomgr/pollset_set_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set_windows.h',
|
||||
'src/core/lib/iomgr/pollset_uv.h',
|
||||
'src/core/lib/iomgr/pollset_windows.h',
|
||||
'src/core/lib/iomgr/port.h',
|
||||
'src/core/lib/iomgr/python_util.h',
|
||||
|
|
@ -1880,7 +1869,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/resolve_address_custom.h',
|
||||
'src/core/lib/iomgr/resource_quota.h',
|
||||
'src/core/lib/iomgr/sockaddr.h',
|
||||
'src/core/lib/iomgr/sockaddr_custom.h',
|
||||
'src/core/lib/iomgr/sockaddr_posix.h',
|
||||
'src/core/lib/iomgr/sockaddr_windows.h',
|
||||
'src/core/lib/iomgr/socket_factory_posix.h',
|
||||
|
|
|
|||
|
|
@ -178,13 +178,11 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc )
|
||||
|
|
@ -891,7 +889,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/endpoint_pair.h )
|
||||
s.files += %w( src/core/lib/iomgr/endpoint_pair_event_engine.cc )
|
||||
s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.cc )
|
||||
s.files += %w( src/core/lib/iomgr/endpoint_pair_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/error.cc )
|
||||
s.files += %w( src/core/lib/iomgr/error.h )
|
||||
|
|
@ -952,7 +949,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/iomgr_internal.h )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_posix.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_posix_cfstream.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/is_epollexclusive_available.cc )
|
||||
s.files += %w( src/core/lib/iomgr/is_epollexclusive_available.h )
|
||||
|
|
@ -973,8 +969,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/pollset_set_custom.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_set_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_set_windows.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_uv.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_windows.h )
|
||||
s.files += %w( src/core/lib/iomgr/port.h )
|
||||
|
|
@ -988,7 +982,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/resource_quota.cc )
|
||||
s.files += %w( src/core/lib/iomgr/resource_quota.h )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr.h )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr_custom.h )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr_posix.h )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr_windows.h )
|
||||
s.files += %w( src/core/lib/iomgr/socket_factory_posix.cc )
|
||||
|
|
@ -1000,7 +993,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/socket_utils_linux.cc )
|
||||
s.files += %w( src/core/lib/iomgr/socket_utils_posix.cc )
|
||||
s.files += %w( src/core/lib/iomgr/socket_utils_posix.h )
|
||||
s.files += %w( src/core/lib/iomgr/socket_utils_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/socket_utils_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/socket_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/socket_windows.h )
|
||||
|
|
@ -1025,7 +1017,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_windows.h )
|
||||
s.files += %w( src/core/lib/iomgr/time_averaged_stats.cc )
|
||||
|
|
@ -1040,7 +1031,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/timer_heap.h )
|
||||
s.files += %w( src/core/lib/iomgr/timer_manager.cc )
|
||||
s.files += %w( src/core/lib/iomgr/timer_manager.h )
|
||||
s.files += %w( src/core/lib/iomgr/timer_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/udp_server.cc )
|
||||
s.files += %w( src/core/lib/iomgr/udp_server.h )
|
||||
s.files += %w( src/core/lib/iomgr/unix_sockets_posix.cc )
|
||||
|
|
|
|||
|
|
@ -522,12 +522,10 @@
|
|||
'src/core/ext/filters/client_channel/resolver.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc',
|
||||
|
|
@ -833,7 +831,6 @@
|
|||
'src/core/lib/iomgr/endpoint_cfstream.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_event_engine.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_posix.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_uv.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_windows.cc',
|
||||
'src/core/lib/iomgr/error.cc',
|
||||
'src/core/lib/iomgr/error_cfstream.cc',
|
||||
|
|
@ -869,7 +866,6 @@
|
|||
'src/core/lib/iomgr/iomgr_internal.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix_cfstream.cc',
|
||||
'src/core/lib/iomgr/iomgr_uv.cc',
|
||||
'src/core/lib/iomgr/iomgr_windows.cc',
|
||||
'src/core/lib/iomgr/is_epollexclusive_available.cc',
|
||||
'src/core/lib/iomgr/load_file.cc',
|
||||
|
|
@ -880,7 +876,6 @@
|
|||
'src/core/lib/iomgr/pollset_set.cc',
|
||||
'src/core/lib/iomgr/pollset_set_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_uv.cc',
|
||||
'src/core/lib/iomgr/pollset_windows.cc',
|
||||
'src/core/lib/iomgr/resolve_address.cc',
|
||||
'src/core/lib/iomgr/resolve_address_custom.cc',
|
||||
|
|
@ -892,7 +887,6 @@
|
|||
'src/core/lib/iomgr/socket_utils_common_posix.cc',
|
||||
'src/core/lib/iomgr/socket_utils_linux.cc',
|
||||
'src/core/lib/iomgr/socket_utils_posix.cc',
|
||||
'src/core/lib/iomgr/socket_utils_uv.cc',
|
||||
'src/core/lib/iomgr/socket_utils_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_client.cc',
|
||||
|
|
@ -909,7 +903,6 @@
|
|||
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.cc',
|
||||
'src/core/lib/iomgr/time_averaged_stats.cc',
|
||||
'src/core/lib/iomgr/timer.cc',
|
||||
|
|
@ -917,7 +910,6 @@
|
|||
'src/core/lib/iomgr/timer_generic.cc',
|
||||
'src/core/lib/iomgr/timer_heap.cc',
|
||||
'src/core/lib/iomgr/timer_manager.cc',
|
||||
'src/core/lib/iomgr/timer_uv.cc',
|
||||
'src/core/lib/iomgr/udp_server.cc',
|
||||
'src/core/lib/iomgr/unix_sockets_posix.cc',
|
||||
'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
|
||||
|
|
@ -1182,12 +1174,10 @@
|
|||
'src/core/ext/filters/client_channel/resolver.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc',
|
||||
|
|
@ -1297,7 +1287,6 @@
|
|||
'src/core/lib/iomgr/endpoint_cfstream.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_event_engine.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_posix.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_uv.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_windows.cc',
|
||||
'src/core/lib/iomgr/error.cc',
|
||||
'src/core/lib/iomgr/error_cfstream.cc',
|
||||
|
|
@ -1333,7 +1322,6 @@
|
|||
'src/core/lib/iomgr/iomgr_internal.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix_cfstream.cc',
|
||||
'src/core/lib/iomgr/iomgr_uv.cc',
|
||||
'src/core/lib/iomgr/iomgr_windows.cc',
|
||||
'src/core/lib/iomgr/is_epollexclusive_available.cc',
|
||||
'src/core/lib/iomgr/load_file.cc',
|
||||
|
|
@ -1344,7 +1332,6 @@
|
|||
'src/core/lib/iomgr/pollset_set.cc',
|
||||
'src/core/lib/iomgr/pollset_set_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_uv.cc',
|
||||
'src/core/lib/iomgr/pollset_windows.cc',
|
||||
'src/core/lib/iomgr/resolve_address.cc',
|
||||
'src/core/lib/iomgr/resolve_address_custom.cc',
|
||||
|
|
@ -1356,7 +1343,6 @@
|
|||
'src/core/lib/iomgr/socket_utils_common_posix.cc',
|
||||
'src/core/lib/iomgr/socket_utils_linux.cc',
|
||||
'src/core/lib/iomgr/socket_utils_posix.cc',
|
||||
'src/core/lib/iomgr/socket_utils_uv.cc',
|
||||
'src/core/lib/iomgr/socket_utils_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_client.cc',
|
||||
|
|
@ -1373,7 +1359,6 @@
|
|||
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.cc',
|
||||
'src/core/lib/iomgr/time_averaged_stats.cc',
|
||||
'src/core/lib/iomgr/timer.cc',
|
||||
|
|
@ -1381,7 +1366,6 @@
|
|||
'src/core/lib/iomgr/timer_generic.cc',
|
||||
'src/core/lib/iomgr/timer_heap.cc',
|
||||
'src/core/lib/iomgr/timer_manager.cc',
|
||||
'src/core/lib/iomgr/timer_uv.cc',
|
||||
'src/core/lib/iomgr/udp_server.cc',
|
||||
'src/core/lib/iomgr/unix_sockets_posix.cc',
|
||||
'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@
|
|||
#include <grpc/support/port_platform.h>
|
||||
|
||||
// Platform-specific sockaddr includes
|
||||
#ifdef GRPC_UV
|
||||
#include <uv.h>
|
||||
#elif defined(GPR_ANDROID) || defined(GPR_LINUX) || defined(GPR_APPLE) || \
|
||||
#if defined(GPR_ANDROID) || defined(GPR_LINUX) || defined(GPR_APPLE) || \
|
||||
defined(GPR_FREEBSD) || defined(GPR_OPENBSD) || defined(GPR_SOLARIS) || \
|
||||
defined(GPR_AIX) || defined(GPR_NACL) || defined(GPR_FUCHSIA) || \
|
||||
defined(GRPC_POSIX_SOCKET)
|
||||
|
|
|
|||
|
|
@ -158,13 +158,11 @@
|
|||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc" role="src" />
|
||||
|
|
@ -871,7 +869,6 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_event_engine.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/error.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/error.h" role="src" />
|
||||
|
|
@ -932,7 +929,6 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix_cfstream.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/is_epollexclusive_available.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/is_epollexclusive_available.h" role="src" />
|
||||
|
|
@ -953,8 +949,6 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_custom.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_uv.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/port.h" role="src" />
|
||||
|
|
@ -968,7 +962,6 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/resource_quota.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resource_quota.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_custom.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_posix.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_windows.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_factory_posix.cc" role="src" />
|
||||
|
|
@ -980,7 +973,6 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_linux.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_posix.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_windows.h" role="src" />
|
||||
|
|
@ -1005,7 +997,6 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_windows.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/time_averaged_stats.cc" role="src" />
|
||||
|
|
@ -1020,7 +1011,6 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_heap.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_manager.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_manager.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/udp_server.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/udp_server.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/unix_sockets_posix.cc" role="src" />
|
||||
|
|
|
|||
|
|
@ -51,10 +51,6 @@
|
|||
/// \see https://github.com/grpc/grpc/blob/master/doc/load-balancing.md for the
|
||||
/// high level design and details.
|
||||
|
||||
// With the addition of a libuv endpoint, sockaddr.h now includes uv.h when
|
||||
// using that endpoint. Because of various transitive includes in uv.h,
|
||||
// including windows.h on Windows, uv.h must be included before other system
|
||||
// headers. Therefore, sockaddr.h must always be included first.
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/sockaddr.h"
|
||||
|
|
|
|||
|
|
@ -471,13 +471,6 @@ static grpc_error_handle blocking_resolve_address_ares(
|
|||
static grpc_address_resolver_vtable ares_resolver = {
|
||||
grpc_resolve_address_ares, blocking_resolve_address_ares};
|
||||
|
||||
#ifdef GRPC_UV
|
||||
/* TODO(murgatroid99): Remove this when we want the cares resolver to be the
|
||||
* default when using libuv */
|
||||
static bool should_use_ares(const char* resolver_env) {
|
||||
return resolver_env != nullptr && gpr_stricmp(resolver_env, "ares") == 0;
|
||||
}
|
||||
#else /* GRPC_UV */
|
||||
static bool should_use_ares(const char* resolver_env) {
|
||||
// TODO(lidiz): Remove the "g_custom_iomgr_enabled" flag once c-ares support
|
||||
// custom IO managers (e.g. gevent).
|
||||
|
|
@ -485,7 +478,6 @@ static bool should_use_ares(const char* resolver_env) {
|
|||
(resolver_env == nullptr || strlen(resolver_env) == 0 ||
|
||||
gpr_stricmp(resolver_env, "ares") == 0);
|
||||
}
|
||||
#endif /* GRPC_UV */
|
||||
|
||||
static bool g_use_ares_dns_resolver;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,179 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2019 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
#if GRPC_ARES == 1 && defined(GRPC_UV)
|
||||
|
||||
#include "absl/strings/str_format.h"
|
||||
|
||||
#include <ares.h>
|
||||
#include <uv.h>
|
||||
|
||||
#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h"
|
||||
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/log.h>
|
||||
#include <grpc/support/string_util.h>
|
||||
#include <grpc/support/time.h>
|
||||
#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h"
|
||||
#include "src/core/lib/gpr/string.h"
|
||||
#include "src/core/lib/iomgr/work_serializer.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
||||
void ares_uv_poll_cb(uv_poll_t* handle, int status, int events);
|
||||
|
||||
void ares_uv_poll_close_cb(uv_handle_t* handle) { delete handle; }
|
||||
|
||||
class GrpcPolledFdLibuv : public GrpcPolledFd {
|
||||
public:
|
||||
GrpcPolledFdLibuv(ares_socket_t as,
|
||||
std::shared_ptr<WorkSerializer> work_serializer)
|
||||
: name_(absl::StrFormat("c-ares socket: %" PRIdPTR, (intptr_t)as)),
|
||||
as_(as),
|
||||
work_serializer_(std::move(work_serializer)) {
|
||||
handle_ = new uv_poll_t();
|
||||
uv_poll_init_socket(uv_default_loop(), handle_, as);
|
||||
handle_->data = this;
|
||||
}
|
||||
|
||||
void RegisterForOnReadableLocked(grpc_closure* read_closure) override {
|
||||
GPR_ASSERT(read_closure_ == nullptr);
|
||||
GPR_ASSERT((poll_events_ & UV_READABLE) == 0);
|
||||
read_closure_ = read_closure;
|
||||
poll_events_ |= UV_READABLE;
|
||||
uv_poll_start(handle_, poll_events_, ares_uv_poll_cb);
|
||||
}
|
||||
|
||||
void RegisterForOnWriteableLocked(grpc_closure* write_closure) override {
|
||||
GPR_ASSERT(write_closure_ == nullptr);
|
||||
GPR_ASSERT((poll_events_ & UV_WRITABLE) == 0);
|
||||
write_closure_ = write_closure;
|
||||
poll_events_ |= UV_WRITABLE;
|
||||
uv_poll_start(handle_, poll_events_, ares_uv_poll_cb);
|
||||
}
|
||||
|
||||
bool IsFdStillReadableLocked() override {
|
||||
/* uv_poll_t is based on poll, which is level triggered. So, if cares
|
||||
* leaves some data unread, the event will trigger again. */
|
||||
return false;
|
||||
}
|
||||
|
||||
void ShutdownInternalLocked(grpc_error_handle error) {
|
||||
uv_poll_stop(handle_);
|
||||
uv_close(reinterpret_cast<uv_handle_t*>(handle_), ares_uv_poll_close_cb);
|
||||
if (read_closure_ != nullptr) {
|
||||
grpc_core::ExecCtx::Run(DEBUG_LOCATION, read_closure_,
|
||||
GRPC_ERROR_CANCELLED);
|
||||
}
|
||||
if (write_closure_ != nullptr) {
|
||||
grpc_core::ExecCtx::Run(DEBUG_LOCATION, write_closure_,
|
||||
GRPC_ERROR_CANCELLED);
|
||||
}
|
||||
}
|
||||
|
||||
void ShutdownLocked(grpc_error_handle error) override {
|
||||
if (grpc_core::ExecCtx::Get() == nullptr) {
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
ShutdownInternalLocked(error);
|
||||
} else {
|
||||
ShutdownInternalLocked(error);
|
||||
}
|
||||
}
|
||||
|
||||
ares_socket_t GetWrappedAresSocketLocked() override { return as_; }
|
||||
|
||||
const char* GetName() override { return name_.c_str(); }
|
||||
|
||||
// TODO(apolcyn): Data members should be private.
|
||||
std::string name_;
|
||||
ares_socket_t as_;
|
||||
uv_poll_t* handle_;
|
||||
grpc_closure* read_closure_ = nullptr;
|
||||
grpc_closure* write_closure_ = nullptr;
|
||||
int poll_events_ = 0;
|
||||
std::shared_ptr<WorkSerializer> work_serializer_;
|
||||
};
|
||||
|
||||
struct AresUvPollCbArg {
|
||||
AresUvPollCbArg(uv_poll_t* handle, int status, int events)
|
||||
: handle(handle), status(status), events(events) {}
|
||||
|
||||
uv_poll_t* handle;
|
||||
int status;
|
||||
int events;
|
||||
};
|
||||
|
||||
static void ares_uv_poll_cb_locked(AresUvPollCbArg* arg) {
|
||||
std::unique_ptr<AresUvPollCbArg> arg_struct(arg);
|
||||
uv_poll_t* handle = arg_struct->handle;
|
||||
int status = arg_struct->status;
|
||||
int events = arg_struct->events;
|
||||
GrpcPolledFdLibuv* polled_fd =
|
||||
reinterpret_cast<GrpcPolledFdLibuv*>(handle->data);
|
||||
grpc_error_handle error = GRPC_ERROR_NONE;
|
||||
if (status < 0) {
|
||||
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("cares polling error");
|
||||
error =
|
||||
grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
|
||||
grpc_slice_from_static_string(uv_strerror(status)));
|
||||
}
|
||||
if (events & UV_READABLE) {
|
||||
GPR_ASSERT(polled_fd->read_closure_ != nullptr);
|
||||
grpc_core::ExecCtx::Run(DEBUG_LOCATION, polled_fd->read_closure_, error);
|
||||
polled_fd->read_closure_ = nullptr;
|
||||
polled_fd->poll_events_ &= ~UV_READABLE;
|
||||
}
|
||||
if (events & UV_WRITABLE) {
|
||||
GPR_ASSERT(polled_fd->write_closure_ != nullptr);
|
||||
grpc_core::ExecCtx::Run(DEBUG_LOCATION, polled_fd->write_closure_, error);
|
||||
polled_fd->write_closure_ = nullptr;
|
||||
polled_fd->poll_events_ &= ~UV_WRITABLE;
|
||||
}
|
||||
uv_poll_start(handle, polled_fd->poll_events_, ares_uv_poll_cb);
|
||||
}
|
||||
|
||||
void ares_uv_poll_cb(uv_poll_t* handle, int status, int events) {
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
GrpcPolledFdLibuv* polled_fd =
|
||||
reinterpret_cast<GrpcPolledFdLibuv*>(handle->data);
|
||||
AresUvPollCbArg* arg = new AresUvPollCbArg(handle, status, events);
|
||||
polled_fd->work_serializer_->Run([arg]() { ares_uv_poll_cb_locked(arg); },
|
||||
DEBUG_LOCATION);
|
||||
}
|
||||
|
||||
class GrpcPolledFdFactoryLibuv : public GrpcPolledFdFactory {
|
||||
public:
|
||||
GrpcPolledFd* NewGrpcPolledFdLocked(
|
||||
ares_socket_t as, grpc_pollset_set* driver_pollset_set,
|
||||
std::shared_ptr<WorkSerializer> work_serializer) override {
|
||||
return new GrpcPolledFdLibuv(as, std::move(work_serializer));
|
||||
}
|
||||
|
||||
void ConfigureAresChannelLocked(ares_channel channel) override {}
|
||||
};
|
||||
|
||||
std::unique_ptr<GrpcPolledFdFactory> NewGrpcPolledFdFactory(
|
||||
std::shared_ptr<WorkSerializer> work_serializer) {
|
||||
return absl::make_unique<GrpcPolledFdFactoryLibuv>();
|
||||
}
|
||||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif /* GRPC_ARES == 1 && defined(GRPC_UV) */
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
#if GRPC_ARES == 1 && defined(GRPC_UV)
|
||||
|
||||
#include <grpc/support/string_util.h>
|
||||
|
||||
#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h"
|
||||
#include "src/core/ext/filters/client_channel/server_address.h"
|
||||
#include "src/core/lib/address_utils/parse_address.h"
|
||||
#include "src/core/lib/gpr/string.h"
|
||||
|
||||
bool grpc_ares_query_ipv6() {
|
||||
/* The libuv grpc code currently does not have the code to probe for this,
|
||||
* so we assume for now that IPv6 is always available in contexts where this
|
||||
* code will be used. */
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif /* GRPC_ARES == 1 && defined(GRPC_UV) */
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
#ifdef GRPC_UV
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <grpc/support/log.h>
|
||||
|
||||
#include "src/core/lib/iomgr/endpoint_pair.h"
|
||||
|
||||
grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(
|
||||
const char* /* name */, grpc_channel_args* /* args */) {
|
||||
grpc_endpoint_pair endpoint_pair;
|
||||
// TODO(mlumish): implement this properly under libuv
|
||||
GPR_ASSERT(false &&
|
||||
"grpc_iomgr_create_endpoint_pair is not suppoted with libuv");
|
||||
GPR_UNREACHABLE_CODE(return endpoint_pair);
|
||||
}
|
||||
|
||||
#endif /* GRPC_UV */
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2018 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
#if defined(GRPC_CUSTOM_SOCKET) && defined(GRPC_UV)
|
||||
|
||||
#include "src/core/lib/iomgr/iomgr_custom.h"
|
||||
#include "src/core/lib/iomgr/iomgr_internal.h"
|
||||
#include "src/core/lib/iomgr/pollset_custom.h"
|
||||
#include "src/core/lib/iomgr/tcp_custom.h"
|
||||
#include "src/core/lib/iomgr/timer_custom.h"
|
||||
|
||||
extern grpc_socket_vtable grpc_uv_socket_vtable;
|
||||
extern grpc_custom_resolver_vtable uv_resolver_vtable;
|
||||
extern grpc_custom_timer_vtable uv_timer_vtable;
|
||||
extern grpc_custom_poller_vtable uv_pollset_vtable;
|
||||
|
||||
void grpc_set_default_iomgr_platform() {
|
||||
grpc_custom_iomgr_init(&grpc_uv_socket_vtable, &uv_resolver_vtable,
|
||||
&uv_timer_vtable, &uv_pollset_vtable);
|
||||
}
|
||||
|
||||
bool grpc_iomgr_run_in_background() { return false; }
|
||||
|
||||
#endif
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
#ifdef GRPC_UV
|
||||
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/log.h>
|
||||
#include "src/core/lib/iomgr/error.h"
|
||||
#include "src/core/lib/iomgr/pollset_custom.h"
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
/* Indicates that grpc_pollset_work should run an iteration of the UV loop
|
||||
before running callbacks. This defaults to 1, and should be disabled if
|
||||
grpc_pollset_work will be called within the callstack of uv_run */
|
||||
int grpc_pollset_work_run_loop = 1;
|
||||
|
||||
static bool g_kicked = false;
|
||||
|
||||
typedef struct uv_poller_handle {
|
||||
uv_timer_t poll_timer;
|
||||
uv_timer_t kick_timer;
|
||||
int refs;
|
||||
} uv_poller_handle;
|
||||
|
||||
static uv_poller_handle* g_handle;
|
||||
|
||||
static void init() {
|
||||
g_handle = (uv_poller_handle*)gpr_malloc(sizeof(uv_poller_handle));
|
||||
g_handle->refs = 2;
|
||||
uv_timer_init(uv_default_loop(), &g_handle->poll_timer);
|
||||
uv_timer_init(uv_default_loop(), &g_handle->kick_timer);
|
||||
}
|
||||
|
||||
static void empty_timer_cb(uv_timer_t* handle) {}
|
||||
|
||||
static void kick_timer_cb(uv_timer_t* handle) { g_kicked = false; }
|
||||
|
||||
static grpc_error* run_loop(size_t timeout) {
|
||||
if (grpc_pollset_work_run_loop) {
|
||||
if (timeout == 0) {
|
||||
uv_run(uv_default_loop(), UV_RUN_NOWAIT);
|
||||
} else {
|
||||
uv_timer_start(&g_handle->poll_timer, empty_timer_cb, timeout, 0);
|
||||
uv_run(uv_default_loop(), UV_RUN_ONCE);
|
||||
uv_timer_stop(&g_handle->poll_timer);
|
||||
}
|
||||
}
|
||||
return GRPC_ERROR_NONE;
|
||||
}
|
||||
|
||||
static void kick() {
|
||||
if (!g_kicked) {
|
||||
g_kicked = true;
|
||||
uv_timer_start(&g_handle->kick_timer, kick_timer_cb, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void close_timer_cb(uv_handle_t* handle) {
|
||||
g_handle->refs--;
|
||||
if (g_handle->refs == 0) {
|
||||
gpr_free(g_handle);
|
||||
}
|
||||
}
|
||||
|
||||
static void shutdown() {
|
||||
uv_close((uv_handle_t*)&g_handle->poll_timer, close_timer_cb);
|
||||
uv_close((uv_handle_t*)&g_handle->kick_timer, close_timer_cb);
|
||||
if (grpc_pollset_work_run_loop) {
|
||||
GPR_ASSERT(uv_run(uv_default_loop(), UV_RUN_DEFAULT) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
grpc_custom_poller_vtable uv_pollset_vtable = {init, run_loop, kick, shutdown};
|
||||
|
||||
#endif /* GRPC_UV */
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_UV_H
|
||||
#define GRPC_CORE_LIB_IOMGR_POLLSET_UV_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/error.h"
|
||||
|
||||
extern int grpc_pollset_work_run_loop;
|
||||
|
||||
typedef struct grpc_custom_poller_vtable {
|
||||
void (*init)(void);
|
||||
grpc_error* (*run_loop)(int blocking);
|
||||
} grpc_custom_poller_vtable;
|
||||
|
||||
void grpc_custom_pollset_global_init(grpc_custom_poller_vtable* vtable);
|
||||
void grpc_custom_pollset_global_shutdown(void);
|
||||
|
||||
#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_UV_H */
|
||||
|
|
@ -20,11 +20,6 @@
|
|||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#ifdef GRPC_UV
|
||||
#ifndef GRPC_CUSTOM_SOCKET
|
||||
#define GRPC_CUSTOM_SOCKET
|
||||
#endif
|
||||
#endif
|
||||
/* This needs to be separate from the other conditions because it needs to
|
||||
* apply to custom sockets too */
|
||||
#ifdef GPR_WINDOWS
|
||||
|
|
|
|||
|
|
@ -25,10 +25,6 @@
|
|||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
#ifdef GRPC_UV
|
||||
#include <uv.h>
|
||||
#endif
|
||||
|
||||
#ifdef GRPC_WINSOCK_SOCKET
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -23,10 +23,12 @@
|
|||
#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_H
|
||||
#define GRPC_CORE_LIB_IOMGR_SOCKADDR_H
|
||||
|
||||
#include <grpc/impl/codegen/port_platform.h>
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
#include "src/core/lib/event_engine/sockaddr.h"
|
||||
#include "src/core/lib/iomgr/sockaddr_custom.h"
|
||||
#include "src/core/lib/iomgr/sockaddr_posix.h"
|
||||
#include "src/core/lib/iomgr/sockaddr_windows.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2018 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_CUSTOM_H
|
||||
#define GRPC_CORE_LIB_IOMGR_SOCKADDR_CUSTOM_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
#ifdef GRPC_UV
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
// TODO(kpayson) It would be nice to abstract this so we don't
|
||||
// depend on anything uv specific
|
||||
typedef struct sockaddr grpc_sockaddr;
|
||||
typedef struct sockaddr_in grpc_sockaddr_in;
|
||||
typedef struct in_addr grpc_in_addr;
|
||||
typedef struct sockaddr_in6 grpc_sockaddr_in6;
|
||||
typedef struct in6_addr grpc_in6_addr;
|
||||
|
||||
#define GRPC_INET_ADDRSTRLEN INET_ADDRSTRLEN
|
||||
#define GRPC_INET6_ADDRSTRLEN INET6_ADDRSTRLEN
|
||||
|
||||
#define GRPC_SOCK_STREAM SOCK_STREAM
|
||||
#define GRPC_SOCK_DGRAM SOCK_DGRAM
|
||||
|
||||
#define GRPC_AF_UNSPEC AF_UNSPEC
|
||||
#define GRPC_AF_UNIX AF_UNIX
|
||||
#define GRPC_AF_INET AF_INET
|
||||
#define GRPC_AF_INET6 AF_INET6
|
||||
|
||||
#define GRPC_AI_PASSIVE AI_PASSIVE
|
||||
|
||||
#endif // GRPC_UV
|
||||
|
||||
#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_CUSTOM_H */
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
#ifdef GRPC_UV
|
||||
|
||||
#include "src/core/lib/iomgr/sockaddr.h"
|
||||
#include "src/core/lib/iomgr/socket_utils.h"
|
||||
|
||||
#include <grpc/support/log.h>
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
uint16_t grpc_htons(uint16_t hostshort) { return htons(hostshort); }
|
||||
|
||||
uint16_t grpc_ntohs(uint16_t netshort) { return ntohs(netshort); }
|
||||
|
||||
uint32_t grpc_htonl(uint32_t hostlong) { return htonl(hostlong); }
|
||||
|
||||
uint32_t grpc_ntohl(uint32_t netlong) { return ntohl(netlong); }
|
||||
|
||||
int grpc_inet_pton(int af, const char* src, void* dst) {
|
||||
return inet_pton(af, src, dst);
|
||||
}
|
||||
|
||||
const char* grpc_inet_ntop(int af, const void* src, char* dst, size_t size) {
|
||||
uv_inet_ntop(af, src, dst, size);
|
||||
return dst;
|
||||
}
|
||||
|
||||
#endif /* GRPC_UV */
|
||||
|
|
@ -254,8 +254,7 @@ static void endpoint_write(grpc_endpoint* ep, grpc_slice_buffer* write_slices,
|
|||
tcp->write_slices = write_slices;
|
||||
GPR_ASSERT(tcp->write_slices->count <= UINT_MAX);
|
||||
if (tcp->write_slices->count == 0) {
|
||||
// No slices means we don't have to do anything,
|
||||
// and libuv doesn't like empty writes
|
||||
// No slices means we don't have to do anything
|
||||
grpc_core::ExecCtx::Run(DEBUG_LOCATION, cb, GRPC_ERROR_NONE);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -465,7 +465,3 @@ grpc_tcp_server_vtable custom_tcp_server_vtable = {
|
|||
tcp_server_port_fd_count, tcp_server_port_fd,
|
||||
tcp_server_ref, tcp_server_shutdown_starting_add,
|
||||
tcp_server_unref, tcp_server_shutdown_listeners};
|
||||
|
||||
#ifdef GRPC_UV_TEST
|
||||
grpc_tcp_server_vtable* default_tcp_server_vtable = &custom_tcp_server_vtable;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,421 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
#ifdef GRPC_UV
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <grpc/slice_buffer.h>
|
||||
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/log.h>
|
||||
#include <grpc/support/string_util.h>
|
||||
|
||||
#include "src/core/lib/gpr/string.h"
|
||||
#include "src/core/lib/iomgr/error.h"
|
||||
#include "src/core/lib/iomgr/iomgr_custom.h"
|
||||
#include "src/core/lib/iomgr/resolve_address_custom.h"
|
||||
#include "src/core/lib/iomgr/resource_quota.h"
|
||||
#include "src/core/lib/iomgr/tcp_custom.h"
|
||||
#include "src/core/lib/slice/slice_internal.h"
|
||||
#include "src/core/lib/slice/slice_string_helpers.h"
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
#define IGNORE_CONST(addr) ((grpc_sockaddr*)(uintptr_t)(addr))
|
||||
|
||||
typedef struct uv_socket_t {
|
||||
uv_connect_t connect_req;
|
||||
uv_write_t write_req;
|
||||
uv_shutdown_t shutdown_req;
|
||||
uv_tcp_t* handle;
|
||||
uv_buf_t* write_buffers;
|
||||
|
||||
char* read_buf;
|
||||
size_t read_len;
|
||||
|
||||
int pending_connections;
|
||||
grpc_custom_socket* accept_socket;
|
||||
grpc_error_handle accept_error;
|
||||
|
||||
grpc_custom_connect_callback connect_cb;
|
||||
grpc_custom_write_callback write_cb;
|
||||
grpc_custom_read_callback read_cb;
|
||||
grpc_custom_accept_callback accept_cb;
|
||||
grpc_custom_close_callback close_cb;
|
||||
|
||||
} uv_socket_t;
|
||||
|
||||
static grpc_error_handle tcp_error_create(const char* desc, int status) {
|
||||
if (status == 0) {
|
||||
return GRPC_ERROR_NONE;
|
||||
}
|
||||
grpc_error_handle error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc);
|
||||
/* All tcp errors are marked with UNAVAILABLE so that application may
|
||||
* choose to retry. */
|
||||
error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS,
|
||||
GRPC_STATUS_UNAVAILABLE);
|
||||
return grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
|
||||
grpc_slice_from_static_string(uv_strerror(status)));
|
||||
}
|
||||
|
||||
static void uv_socket_destroy(grpc_custom_socket* socket) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
gpr_free(uv_socket->handle);
|
||||
gpr_free(uv_socket);
|
||||
}
|
||||
|
||||
static void alloc_uv_buf(uv_handle_t* handle, size_t suggested_size,
|
||||
uv_buf_t* buf) {
|
||||
uv_socket_t* uv_socket =
|
||||
(uv_socket_t*)((grpc_custom_socket*)handle->data)->impl;
|
||||
(void)suggested_size;
|
||||
buf->base = uv_socket->read_buf;
|
||||
buf->len = uv_socket->read_len;
|
||||
}
|
||||
|
||||
static void uv_read_callback(uv_stream_t* stream, ssize_t nread,
|
||||
const uv_buf_t* buf) {
|
||||
grpc_error_handle error = GRPC_ERROR_NONE;
|
||||
if (nread == 0) {
|
||||
// Nothing happened. Wait for the next callback
|
||||
return;
|
||||
}
|
||||
// TODO(murgatroid99): figure out what the return value here means
|
||||
uv_read_stop(stream);
|
||||
if (nread == UV_EOF) {
|
||||
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("EOF");
|
||||
} else if (nread < 0) {
|
||||
error = tcp_error_create("TCP Read failed", nread);
|
||||
}
|
||||
grpc_custom_socket* socket = (grpc_custom_socket*)stream->data;
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
uv_socket->read_cb(socket, (size_t)nread, error);
|
||||
}
|
||||
|
||||
static void uv_close_callback(uv_handle_t* handle) {
|
||||
grpc_custom_socket* socket = (grpc_custom_socket*)handle->data;
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
if (uv_socket->accept_socket) {
|
||||
uv_socket->accept_cb(socket, uv_socket->accept_socket,
|
||||
GRPC_ERROR_CREATE_FROM_STATIC_STRING("socket closed"));
|
||||
}
|
||||
uv_socket->close_cb(socket);
|
||||
}
|
||||
|
||||
static void uv_socket_read(grpc_custom_socket* socket, char* buffer,
|
||||
size_t length, grpc_custom_read_callback read_cb) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
int status;
|
||||
grpc_error_handle error;
|
||||
uv_socket->read_cb = read_cb;
|
||||
uv_socket->read_buf = buffer;
|
||||
uv_socket->read_len = length;
|
||||
// TODO(murgatroid99): figure out what the return value here means
|
||||
status =
|
||||
uv_read_start((uv_stream_t*)uv_socket->handle, (uv_alloc_cb)alloc_uv_buf,
|
||||
(uv_read_cb)uv_read_callback);
|
||||
if (status != 0) {
|
||||
error = tcp_error_create("TCP Read failed at start", status);
|
||||
uv_socket->read_cb(socket, 0, error);
|
||||
}
|
||||
}
|
||||
|
||||
static void uv_write_callback(uv_write_t* req, int status) {
|
||||
grpc_custom_socket* socket = (grpc_custom_socket*)req->data;
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
gpr_free(uv_socket->write_buffers);
|
||||
uv_socket->write_cb(socket, tcp_error_create("TCP Write failed", status));
|
||||
}
|
||||
|
||||
void uv_socket_write(grpc_custom_socket* socket,
|
||||
grpc_slice_buffer* write_slices,
|
||||
grpc_custom_write_callback write_cb) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
uv_socket->write_cb = write_cb;
|
||||
uv_buf_t* uv_buffers;
|
||||
uv_write_t* write_req;
|
||||
|
||||
uv_buffers = (uv_buf_t*)gpr_malloc(sizeof(uv_buf_t) * write_slices->count);
|
||||
for (size_t i = 0; i < write_slices->count; i++) {
|
||||
uv_buffers[i].base = (char*)GRPC_SLICE_START_PTR(write_slices->slices[i]);
|
||||
uv_buffers[i].len = GRPC_SLICE_LENGTH(write_slices->slices[i]);
|
||||
}
|
||||
|
||||
uv_socket->write_buffers = uv_buffers;
|
||||
write_req = &uv_socket->write_req;
|
||||
write_req->data = socket;
|
||||
// TODO(murgatroid99): figure out what the return value here means
|
||||
uv_write(write_req, (uv_stream_t*)uv_socket->handle, uv_buffers,
|
||||
write_slices->count, uv_write_callback);
|
||||
}
|
||||
|
||||
static void shutdown_callback(uv_shutdown_t* req, int status) {}
|
||||
|
||||
static void uv_socket_shutdown(grpc_custom_socket* socket) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
uv_shutdown_t* req = &uv_socket->shutdown_req;
|
||||
uv_shutdown(req, (uv_stream_t*)uv_socket->handle, shutdown_callback);
|
||||
}
|
||||
|
||||
static void uv_socket_close(grpc_custom_socket* socket,
|
||||
grpc_custom_close_callback close_cb) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
uv_socket->close_cb = close_cb;
|
||||
uv_close((uv_handle_t*)uv_socket->handle, uv_close_callback);
|
||||
}
|
||||
|
||||
static grpc_error_handle uv_socket_init_helper(uv_socket_t* uv_socket,
|
||||
int domain) {
|
||||
uv_tcp_t* tcp = (uv_tcp_t*)gpr_malloc(sizeof(uv_tcp_t));
|
||||
uv_socket->handle = tcp;
|
||||
int status = uv_tcp_init_ex(uv_default_loop(), tcp, (unsigned int)domain);
|
||||
if (status != 0) {
|
||||
return tcp_error_create("Failed to initialize UV tcp handle", status);
|
||||
}
|
||||
#if defined(GPR_LINUX) && defined(SO_REUSEPORT)
|
||||
if (domain == AF_INET || domain == AF_INET6) {
|
||||
int enable = 1;
|
||||
int fd;
|
||||
uv_fileno((uv_handle_t*)tcp, &fd);
|
||||
// TODO Handle error here.
|
||||
setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &enable, sizeof(enable));
|
||||
}
|
||||
#endif
|
||||
uv_socket->write_buffers = nullptr;
|
||||
uv_socket->read_len = 0;
|
||||
uv_tcp_nodelay(uv_socket->handle, 1);
|
||||
// Node uses a garbage collector to call destructors, so we don't
|
||||
// want to hold the uv loop open with active gRPC objects.
|
||||
uv_unref((uv_handle_t*)uv_socket->handle);
|
||||
uv_socket->pending_connections = 0;
|
||||
uv_socket->accept_socket = nullptr;
|
||||
uv_socket->accept_error = GRPC_ERROR_NONE;
|
||||
return GRPC_ERROR_NONE;
|
||||
}
|
||||
|
||||
static grpc_error_handle uv_socket_init(grpc_custom_socket* socket,
|
||||
int domain) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)gpr_malloc(sizeof(uv_socket_t));
|
||||
grpc_error_handle error = uv_socket_init_helper(uv_socket, domain);
|
||||
if (error != GRPC_ERROR_NONE) {
|
||||
return error;
|
||||
}
|
||||
uv_socket->handle->data = socket;
|
||||
socket->impl = uv_socket;
|
||||
return GRPC_ERROR_NONE;
|
||||
}
|
||||
|
||||
static grpc_error_handle uv_socket_getpeername(grpc_custom_socket* socket,
|
||||
const grpc_sockaddr* addr,
|
||||
int* addr_len) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
int err = uv_tcp_getpeername(uv_socket->handle,
|
||||
(struct sockaddr*)IGNORE_CONST(addr), addr_len);
|
||||
return tcp_error_create("getpeername failed", err);
|
||||
}
|
||||
|
||||
static grpc_error_handle uv_socket_getsockname(grpc_custom_socket* socket,
|
||||
const grpc_sockaddr* addr,
|
||||
int* addr_len) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
int err = uv_tcp_getsockname(uv_socket->handle,
|
||||
(struct sockaddr*)IGNORE_CONST(addr), addr_len);
|
||||
return tcp_error_create("getsockname failed", err);
|
||||
}
|
||||
|
||||
static void accept_new_connection(grpc_custom_socket* socket) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
if (uv_socket->pending_connections == 0 || !uv_socket->accept_socket) {
|
||||
return;
|
||||
}
|
||||
grpc_custom_socket* new_socket = uv_socket->accept_socket;
|
||||
grpc_error_handle error = uv_socket->accept_error;
|
||||
uv_socket->accept_socket = nullptr;
|
||||
uv_socket->accept_error = GRPC_ERROR_NONE;
|
||||
uv_socket->pending_connections -= 1;
|
||||
if (uv_socket->accept_error != GRPC_ERROR_NONE) {
|
||||
uv_stream_t phony_handle;
|
||||
uv_accept((uv_stream_t*)uv_socket->handle, &phony_handle);
|
||||
uv_socket->accept_cb(socket, new_socket, error);
|
||||
} else {
|
||||
uv_socket_t* uv_new_socket = (uv_socket_t*)gpr_malloc(sizeof(uv_socket_t));
|
||||
uv_socket_init_helper(uv_new_socket, AF_UNSPEC);
|
||||
// UV documentation says this is guaranteed to succeed
|
||||
GPR_ASSERT(uv_accept((uv_stream_t*)uv_socket->handle,
|
||||
(uv_stream_t*)uv_new_socket->handle) == 0);
|
||||
new_socket->impl = uv_new_socket;
|
||||
uv_new_socket->handle->data = new_socket;
|
||||
uv_socket->accept_cb(socket, new_socket, error);
|
||||
}
|
||||
}
|
||||
|
||||
static void uv_on_connect(uv_stream_t* server, int status) {
|
||||
grpc_custom_socket* socket = (grpc_custom_socket*)server->data;
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
if (status < 0) {
|
||||
switch (status) {
|
||||
case UV_EINTR:
|
||||
case UV_EAGAIN:
|
||||
return;
|
||||
default:
|
||||
uv_socket->accept_error = tcp_error_create("accept failed", status);
|
||||
}
|
||||
}
|
||||
uv_socket->pending_connections += 1;
|
||||
accept_new_connection(socket);
|
||||
}
|
||||
|
||||
void uv_socket_accept(grpc_custom_socket* socket,
|
||||
grpc_custom_socket* new_socket,
|
||||
grpc_custom_accept_callback accept_cb) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
uv_socket->accept_cb = accept_cb;
|
||||
GPR_ASSERT(uv_socket->accept_socket == nullptr);
|
||||
uv_socket->accept_socket = new_socket;
|
||||
accept_new_connection(socket);
|
||||
}
|
||||
|
||||
static grpc_error_handle uv_socket_bind(grpc_custom_socket* socket,
|
||||
const grpc_sockaddr* addr, size_t len,
|
||||
int flags) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
int status =
|
||||
uv_tcp_bind((uv_tcp_t*)uv_socket->handle, (struct sockaddr*)addr, 0);
|
||||
return tcp_error_create("Failed to bind to port", status);
|
||||
}
|
||||
|
||||
static grpc_error_handle uv_socket_listen(grpc_custom_socket* socket) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
int status =
|
||||
uv_listen((uv_stream_t*)uv_socket->handle, SOMAXCONN, uv_on_connect);
|
||||
return tcp_error_create("Failed to listen to port", status);
|
||||
}
|
||||
|
||||
static void uv_tc_on_connect(uv_connect_t* req, int status) {
|
||||
grpc_custom_socket* socket = (grpc_custom_socket*)req->data;
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
grpc_error_handle error;
|
||||
if (status == UV_ECANCELED) {
|
||||
// This should only happen if the handle is already closed
|
||||
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Timeout occurred");
|
||||
} else {
|
||||
error = tcp_error_create("Failed to connect to remote host", status);
|
||||
}
|
||||
uv_socket->connect_cb(socket, error);
|
||||
}
|
||||
|
||||
static void uv_socket_connect(grpc_custom_socket* socket,
|
||||
const grpc_sockaddr* addr, size_t len,
|
||||
grpc_custom_connect_callback connect_cb) {
|
||||
uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
|
||||
uv_socket->connect_cb = connect_cb;
|
||||
uv_socket->connect_req.data = socket;
|
||||
int status = uv_tcp_connect(&uv_socket->connect_req, uv_socket->handle,
|
||||
(struct sockaddr*)addr, uv_tc_on_connect);
|
||||
if (status != 0) {
|
||||
// The callback will not be called
|
||||
uv_socket->connect_cb(socket, tcp_error_create("connect failed", status));
|
||||
}
|
||||
}
|
||||
|
||||
static grpc_resolved_addresses* handle_addrinfo_result(
|
||||
struct addrinfo* result) {
|
||||
struct addrinfo* resp;
|
||||
size_t i;
|
||||
grpc_resolved_addresses* addresses =
|
||||
(grpc_resolved_addresses*)gpr_malloc(sizeof(grpc_resolved_addresses));
|
||||
addresses->naddrs = 0;
|
||||
for (resp = result; resp != nullptr; resp = resp->ai_next) {
|
||||
addresses->naddrs++;
|
||||
}
|
||||
addresses->addrs = (grpc_resolved_address*)gpr_malloc(
|
||||
sizeof(grpc_resolved_address) * addresses->naddrs);
|
||||
for (resp = result, i = 0; resp != nullptr; resp = resp->ai_next, i++) {
|
||||
memcpy(&addresses->addrs[i].addr, resp->ai_addr, resp->ai_addrlen);
|
||||
addresses->addrs[i].len = resp->ai_addrlen;
|
||||
}
|
||||
// addrinfo objects are allocated by libuv (e.g. in uv_getaddrinfo)
|
||||
// and not by gpr_malloc
|
||||
uv_freeaddrinfo(result);
|
||||
return addresses;
|
||||
}
|
||||
|
||||
static void uv_resolve_callback(uv_getaddrinfo_t* req, int status,
|
||||
struct addrinfo* res) {
|
||||
grpc_custom_resolver* r = (grpc_custom_resolver*)req->data;
|
||||
gpr_free(req);
|
||||
grpc_resolved_addresses* result = nullptr;
|
||||
if (status == 0) {
|
||||
result = handle_addrinfo_result(res);
|
||||
}
|
||||
grpc_custom_resolve_callback(r, result,
|
||||
tcp_error_create("getaddrinfo failed", status));
|
||||
}
|
||||
|
||||
static grpc_error_handle uv_resolve(const char* host, const char* port,
|
||||
grpc_resolved_addresses** result) {
|
||||
int status;
|
||||
uv_getaddrinfo_t req;
|
||||
struct addrinfo hints;
|
||||
memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_family = AF_UNSPEC; /* ipv4 or ipv6 */
|
||||
hints.ai_socktype = SOCK_STREAM; /* stream socket */
|
||||
hints.ai_flags = AI_PASSIVE; /* for wildcard IP address */
|
||||
status = uv_getaddrinfo(uv_default_loop(), &req, NULL, host, port, &hints);
|
||||
if (status != 0) {
|
||||
*result = nullptr;
|
||||
} else {
|
||||
*result = handle_addrinfo_result(req.addrinfo);
|
||||
}
|
||||
return tcp_error_create("getaddrinfo failed", status);
|
||||
}
|
||||
|
||||
static void uv_resolve_async(grpc_custom_resolver* r, const char* host,
|
||||
const char* port) {
|
||||
int status;
|
||||
uv_getaddrinfo_t* req =
|
||||
(uv_getaddrinfo_t*)gpr_malloc(sizeof(uv_getaddrinfo_t));
|
||||
req->data = r;
|
||||
struct addrinfo hints;
|
||||
memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_family = GRPC_AF_UNSPEC; /* ipv4 or ipv6 */
|
||||
hints.ai_socktype = GRPC_SOCK_STREAM; /* stream socket */
|
||||
hints.ai_flags = GRPC_AI_PASSIVE; /* for wildcard IP address */
|
||||
status = uv_getaddrinfo(uv_default_loop(), req, uv_resolve_callback, host,
|
||||
port, &hints);
|
||||
if (status != 0) {
|
||||
gpr_free(req);
|
||||
grpc_error_handle error = tcp_error_create("getaddrinfo failed", status);
|
||||
grpc_custom_resolve_callback(r, NULL, error);
|
||||
}
|
||||
}
|
||||
|
||||
grpc_custom_resolver_vtable uv_resolver_vtable = {uv_resolve, uv_resolve_async};
|
||||
|
||||
grpc_socket_vtable grpc_uv_socket_vtable = {
|
||||
uv_socket_init, uv_socket_connect, uv_socket_destroy,
|
||||
uv_socket_shutdown, uv_socket_close, uv_socket_write,
|
||||
uv_socket_read, uv_socket_getpeername, uv_socket_getsockname,
|
||||
uv_socket_bind, uv_socket_listen, uv_socket_accept};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
#ifdef GRPC_UV
|
||||
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/log.h>
|
||||
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/iomgr/iomgr_custom.h"
|
||||
#include "src/core/lib/iomgr/timer.h"
|
||||
#include "src/core/lib/iomgr/timer_custom.h"
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
static void timer_close_callback(uv_handle_t* handle) { gpr_free(handle); }
|
||||
|
||||
static void stop_uv_timer(uv_timer_t* handle) {
|
||||
uv_timer_stop(handle);
|
||||
uv_unref((uv_handle_t*)handle);
|
||||
uv_close((uv_handle_t*)handle, timer_close_callback);
|
||||
}
|
||||
|
||||
void run_expired_timer(uv_timer_t* handle) {
|
||||
grpc_custom_timer* timer_wrapper = (grpc_custom_timer*)handle->data;
|
||||
grpc_custom_timer_callback(timer_wrapper, GRPC_ERROR_NONE);
|
||||
}
|
||||
|
||||
static void timer_start(grpc_custom_timer* t) {
|
||||
uv_timer_t* uv_timer;
|
||||
uv_timer = (uv_timer_t*)gpr_malloc(sizeof(uv_timer_t));
|
||||
uv_timer_init(uv_default_loop(), uv_timer);
|
||||
uv_timer->data = t;
|
||||
t->timer = (void*)uv_timer;
|
||||
uv_timer_start(uv_timer, run_expired_timer, t->timeout_ms, 0);
|
||||
// Node uses a garbage collector to call destructors, so we don't
|
||||
// want to hold the uv loop open with active gRPC objects.
|
||||
uv_unref((uv_handle_t*)uv_timer);
|
||||
}
|
||||
|
||||
static void timer_stop(grpc_custom_timer* t) {
|
||||
stop_uv_timer((uv_timer_t*)t->timer);
|
||||
}
|
||||
|
||||
grpc_custom_timer_vtable uv_timer_vtable = {timer_start, timer_stop};
|
||||
|
||||
#endif
|
||||
|
|
@ -16,10 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when
|
||||
using that endpoint. Because of various transitive includes in uv.h,
|
||||
including windows.h on Windows, uv.h must be included before other system
|
||||
headers. Therefore, sockaddr.h must always be included first */
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include <new>
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@
|
|||
#include <grpc/grpc.h>
|
||||
|
||||
#ifndef _STRUCT_IOVEC
|
||||
#if !defined(GRPC_EVENT_ENGINE_POSIX) && !defined(GRPC_UV)
|
||||
#if !defined(GRPC_EVENT_ENGINE_POSIX)
|
||||
struct iovec {
|
||||
void* iov_base;
|
||||
size_t iov_len;
|
||||
};
|
||||
#endif // GRPC_EVENT_ENGINE_POSIX && GRPC_UV
|
||||
#endif // GRPC_EVENT_ENGINE_POSIX
|
||||
#endif // _STRUCT_IOVEC
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -53,12 +53,10 @@ CORE_SOURCE_FILES = [
|
|||
'src/core/ext/filters/client_channel/resolver.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc',
|
||||
|
|
@ -420,7 +418,6 @@ CORE_SOURCE_FILES = [
|
|||
'src/core/lib/iomgr/endpoint_cfstream.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_event_engine.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_posix.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_uv.cc',
|
||||
'src/core/lib/iomgr/endpoint_pair_windows.cc',
|
||||
'src/core/lib/iomgr/error.cc',
|
||||
'src/core/lib/iomgr/error_cfstream.cc',
|
||||
|
|
@ -456,7 +453,6 @@ CORE_SOURCE_FILES = [
|
|||
'src/core/lib/iomgr/iomgr_internal.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix_cfstream.cc',
|
||||
'src/core/lib/iomgr/iomgr_uv.cc',
|
||||
'src/core/lib/iomgr/iomgr_windows.cc',
|
||||
'src/core/lib/iomgr/is_epollexclusive_available.cc',
|
||||
'src/core/lib/iomgr/load_file.cc',
|
||||
|
|
@ -467,7 +463,6 @@ CORE_SOURCE_FILES = [
|
|||
'src/core/lib/iomgr/pollset_set.cc',
|
||||
'src/core/lib/iomgr/pollset_set_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_uv.cc',
|
||||
'src/core/lib/iomgr/pollset_windows.cc',
|
||||
'src/core/lib/iomgr/resolve_address.cc',
|
||||
'src/core/lib/iomgr/resolve_address_custom.cc',
|
||||
|
|
@ -479,7 +474,6 @@ CORE_SOURCE_FILES = [
|
|||
'src/core/lib/iomgr/socket_utils_common_posix.cc',
|
||||
'src/core/lib/iomgr/socket_utils_linux.cc',
|
||||
'src/core/lib/iomgr/socket_utils_posix.cc',
|
||||
'src/core/lib/iomgr/socket_utils_uv.cc',
|
||||
'src/core/lib/iomgr/socket_utils_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_client.cc',
|
||||
|
|
@ -496,7 +490,6 @@ CORE_SOURCE_FILES = [
|
|||
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.cc',
|
||||
'src/core/lib/iomgr/time_averaged_stats.cc',
|
||||
'src/core/lib/iomgr/timer.cc',
|
||||
|
|
@ -504,7 +497,6 @@ CORE_SOURCE_FILES = [
|
|||
'src/core/lib/iomgr/timer_generic.cc',
|
||||
'src/core/lib/iomgr/timer_heap.cc',
|
||||
'src/core/lib/iomgr/timer_manager.cc',
|
||||
'src/core/lib/iomgr/timer_uv.cc',
|
||||
'src/core/lib/iomgr/udp_server.cc',
|
||||
'src/core/lib/iomgr/unix_sockets_posix.cc',
|
||||
'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class DNSResolverTest(unittest.TestCase):
|
|||
def test_connect_loopback(self):
|
||||
# NOTE(https://github.com/grpc/grpc/issues/18422)
|
||||
# In short, Gevent + C-Ares = Segfault. The C-Ares driver is not
|
||||
# supported by custom io manager like "gevent" or "libuv".
|
||||
# supported by custom io manager like "gevent"
|
||||
with grpc.insecure_channel('loopback4.unittest.grpc.io:%d' %
|
||||
self._port) as channel:
|
||||
self.assertEqual(
|
||||
|
|
|
|||
|
|
@ -14,10 +14,6 @@
|
|||
// limitations under the License.
|
||||
//
|
||||
|
||||
// With the addition of a libuv endpoint, sockaddr.h now includes uv.h when
|
||||
// using that endpoint. Because of various transitive includes in uv.h,
|
||||
// including windows.h on Windows, uv.h must be included before other system
|
||||
// headers. Therefore, sockaddr.h must always be included first
|
||||
#include "src/core/lib/address_utils/sockaddr_utils.h"
|
||||
#include "src/core/lib/iomgr/sockaddr.h"
|
||||
#include "src/core/lib/iomgr/socket_utils.h"
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when
|
||||
using that endpoint. Because of various transitive includes in uv.h,
|
||||
including windows.h on Windows, uv.h must be included before other system
|
||||
headers. Therefore, sockaddr.h must always be included first */
|
||||
#include "src/core/lib/iomgr/sockaddr.h"
|
||||
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* This check is for testing only. */
|
||||
#ifndef GRPC_UV
|
||||
|
||||
#include <grpc/support/alloc.h>
|
||||
|
||||
#include "test/core/end2end/cq_verifier_internal.h"
|
||||
|
|
@ -56,5 +53,3 @@ grpc_event cq_verifier_next_event(cq_verifier* v, int timeout_seconds) {
|
|||
grpc_timeout_seconds_to_deadline(timeout_seconds);
|
||||
return grpc_completion_queue_next(v->cq, deadline, nullptr);
|
||||
}
|
||||
|
||||
#endif /* GRPC_UV */
|
||||
|
|
|
|||
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#ifdef GRPC_UV
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/log.h>
|
||||
|
||||
#include "test/core/end2end/cq_verifier_internal.h"
|
||||
|
||||
typedef enum timer_state {
|
||||
TIMER_STARTED,
|
||||
TIMER_TRIGGERED,
|
||||
TIMER_CLOSED
|
||||
} timer_state;
|
||||
|
||||
/* the verifier itself */
|
||||
struct cq_verifier {
|
||||
/* bound completion queue */
|
||||
grpc_completion_queue* cq;
|
||||
/* start of expectation list */
|
||||
expectation* first_expectation;
|
||||
uv_timer_t timer;
|
||||
};
|
||||
|
||||
cq_verifier* cq_verifier_create(grpc_completion_queue* cq) {
|
||||
cq_verifier* v = static_cast<cq_verifier*>(gpr_malloc(sizeof(cq_verifier)));
|
||||
v->cq = cq;
|
||||
v->first_expectation = NULL;
|
||||
uv_timer_init(uv_default_loop(), &v->timer);
|
||||
v->timer.data = (void*)TIMER_STARTED;
|
||||
return v;
|
||||
}
|
||||
|
||||
static void timer_close_cb(uv_handle_t* handle) {
|
||||
handle->data = (void*)TIMER_CLOSED;
|
||||
}
|
||||
|
||||
void cq_verifier_destroy(cq_verifier* v) {
|
||||
cq_verify(v);
|
||||
uv_close((uv_handle_t*)&v->timer, timer_close_cb);
|
||||
while (static_cast<timer_state>(v->timer.data) != TIMER_CLOSED) {
|
||||
uv_run(uv_default_loop(), UV_RUN_NOWAIT);
|
||||
}
|
||||
gpr_free(v);
|
||||
}
|
||||
|
||||
expectation* cq_verifier_get_first_expectation(cq_verifier* v) {
|
||||
return v->first_expectation;
|
||||
}
|
||||
|
||||
void cq_verifier_set_first_expectation(cq_verifier* v, expectation* e) {
|
||||
v->first_expectation = e;
|
||||
}
|
||||
|
||||
static void timer_run_cb(uv_timer_t* timer) {
|
||||
timer->data = (void*)TIMER_TRIGGERED;
|
||||
}
|
||||
|
||||
grpc_event cq_verifier_next_event(cq_verifier* v, int timeout_seconds) {
|
||||
uint64_t timeout_ms =
|
||||
timeout_seconds < 0 ? 0 : (uint64_t)timeout_seconds * 1000;
|
||||
grpc_event ev;
|
||||
v->timer.data = (void*)TIMER_STARTED;
|
||||
uv_timer_start(&v->timer, timer_run_cb, timeout_ms, 0);
|
||||
ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC),
|
||||
NULL);
|
||||
// Stop the loop if the timer goes off or we get a non-timeout event
|
||||
while ((static_cast<timer_state>(v->timer.data) != TIMER_TRIGGERED) &&
|
||||
ev.type == GRPC_QUEUE_TIMEOUT) {
|
||||
uv_run(uv_default_loop(), UV_RUN_ONCE);
|
||||
ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC),
|
||||
NULL);
|
||||
}
|
||||
return ev;
|
||||
}
|
||||
|
||||
#endif /* GRPC_UV */
|
||||
|
|
@ -16,10 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when
|
||||
using that endpoint. Because of various transitive includes in uv.h,
|
||||
including windows.h on Windows, uv.h must be included before other system
|
||||
headers. Therefore, sockaddr.h must always be included first */
|
||||
#include "src/core/lib/iomgr/sockaddr.h"
|
||||
#include "src/core/lib/iomgr/socket_utils.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@
|
|||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
// grpc_ipv6_loopback_available isn't currently available on UV.
|
||||
#ifndef GRPC_UV
|
||||
|
||||
#include <grpc/grpc.h>
|
||||
#include <grpc/support/log.h>
|
||||
#include "test/core/util/test_config.h"
|
||||
|
|
@ -40,9 +37,3 @@ int main(int argc, char** argv) {
|
|||
grpc_shutdown();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int main(int argc, char** argv) { return 0; }
|
||||
|
||||
#endif /* GRPC_UV */
|
||||
|
|
|
|||
|
|
@ -355,9 +355,7 @@ int main(int argc, char** argv) {
|
|||
GPR_GLOBAL_CONFIG_SET(grpc_dns_resolver, "native");
|
||||
} else if (resolver_type != nullptr &&
|
||||
gpr_stricmp(resolver_type, "ares") == 0) {
|
||||
#ifndef GRPC_UV
|
||||
GPR_GLOBAL_CONFIG_SET(grpc_dns_resolver, "ares");
|
||||
#endif
|
||||
} else {
|
||||
gpr_log(GPR_ERROR, "--resolver_type was not set to ares or native");
|
||||
abort();
|
||||
|
|
|
|||
|
|
@ -1,215 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2017 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
// This test won't work except with libuv
|
||||
#ifdef GRPC_UV
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "src/core/lib/iomgr/tcp_client.h"
|
||||
|
||||
#include <grpc/grpc.h>
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/log.h>
|
||||
#include <grpc/support/time.h>
|
||||
|
||||
#include "src/core/lib/iomgr/iomgr.h"
|
||||
#include "src/core/lib/iomgr/pollset.h"
|
||||
#include "src/core/lib/iomgr/timer.h"
|
||||
#include "test/core/util/resource_user_util.h"
|
||||
#include "test/core/util/test_config.h"
|
||||
|
||||
static gpr_mu* g_mu;
|
||||
static grpc_pollset* g_pollset;
|
||||
static int g_connections_complete = 0;
|
||||
static grpc_endpoint* g_connecting = NULL;
|
||||
|
||||
static grpc_millis test_deadline(void) {
|
||||
return grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(10));
|
||||
}
|
||||
|
||||
static void finish_connection() {
|
||||
gpr_mu_lock(g_mu);
|
||||
g_connections_complete++;
|
||||
GPR_ASSERT(
|
||||
GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL)));
|
||||
gpr_mu_unlock(g_mu);
|
||||
}
|
||||
|
||||
static void must_succeed(void* arg, grpc_error_handle error) {
|
||||
GPR_ASSERT(g_connecting != NULL);
|
||||
GPR_ASSERT(error == GRPC_ERROR_NONE);
|
||||
grpc_endpoint_shutdown(g_connecting, GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
||||
"must_succeed called"));
|
||||
grpc_endpoint_destroy(g_connecting);
|
||||
g_connecting = NULL;
|
||||
finish_connection();
|
||||
}
|
||||
|
||||
static void must_fail(void* arg, grpc_error_handle error) {
|
||||
GPR_ASSERT(g_connecting == NULL);
|
||||
GPR_ASSERT(error != GRPC_ERROR_NONE);
|
||||
finish_connection();
|
||||
}
|
||||
|
||||
static void close_cb(uv_handle_t* handle) { gpr_free(handle); }
|
||||
|
||||
static void connection_cb(uv_stream_t* server, int status) {
|
||||
uv_tcp_t* client_handle =
|
||||
static_cast<uv_tcp_t*>(gpr_malloc(sizeof(uv_tcp_t)));
|
||||
GPR_ASSERT(0 == status);
|
||||
GPR_ASSERT(0 == uv_tcp_init(uv_default_loop(), client_handle));
|
||||
GPR_ASSERT(0 == uv_accept(server, (uv_stream_t*)client_handle));
|
||||
uv_close((uv_handle_t*)client_handle, close_cb);
|
||||
}
|
||||
|
||||
void test_succeeds(void) {
|
||||
grpc_resolved_address resolved_addr;
|
||||
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
|
||||
uv_tcp_t* svr_handle = static_cast<uv_tcp_t*>(gpr_malloc(sizeof(uv_tcp_t)));
|
||||
int connections_complete_before;
|
||||
grpc_closure done;
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
|
||||
gpr_log(GPR_DEBUG, "test_succeeds");
|
||||
|
||||
memset(&resolved_addr, 0, sizeof(resolved_addr));
|
||||
resolved_addr.len = sizeof(struct sockaddr_in);
|
||||
addr->sin_family = AF_INET;
|
||||
|
||||
/* create a phony server */
|
||||
GPR_ASSERT(0 == uv_tcp_init(uv_default_loop(), svr_handle));
|
||||
GPR_ASSERT(0 == uv_tcp_bind(svr_handle, (struct sockaddr*)addr, 0));
|
||||
GPR_ASSERT(0 == uv_listen((uv_stream_t*)svr_handle, 1, connection_cb));
|
||||
|
||||
gpr_mu_lock(g_mu);
|
||||
connections_complete_before = g_connections_complete;
|
||||
gpr_mu_unlock(g_mu);
|
||||
|
||||
/* connect to it */
|
||||
GPR_ASSERT(uv_tcp_getsockname(svr_handle, (struct sockaddr*)addr,
|
||||
(int*)&resolved_addr.len) == 0);
|
||||
GRPC_CLOSURE_INIT(&done, must_succeed, NULL, grpc_schedule_on_exec_ctx);
|
||||
grpc_tcp_client_connect(&done, &g_connecting,
|
||||
grpc_slice_allocator_create_unlimited(), NULL, NULL,
|
||||
&resolved_addr, GRPC_MILLIS_INF_FUTURE);
|
||||
gpr_mu_lock(g_mu);
|
||||
|
||||
while (g_connections_complete == connections_complete_before) {
|
||||
grpc_pollset_worker* worker = NULL;
|
||||
GPR_ASSERT(GRPC_LOG_IF_ERROR(
|
||||
"pollset_work",
|
||||
grpc_pollset_work(g_pollset, &worker,
|
||||
grpc_timespec_to_millis_round_up(
|
||||
grpc_timeout_seconds_to_deadline(5)))));
|
||||
gpr_mu_unlock(g_mu);
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
gpr_mu_lock(g_mu);
|
||||
}
|
||||
|
||||
// This will get cleaned up when the pollset runs again or gets shutdown
|
||||
uv_close((uv_handle_t*)svr_handle, close_cb);
|
||||
|
||||
gpr_mu_unlock(g_mu);
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
}
|
||||
|
||||
void test_fails(void) {
|
||||
grpc_resolved_address resolved_addr;
|
||||
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
|
||||
int connections_complete_before;
|
||||
grpc_closure done;
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
|
||||
gpr_log(GPR_DEBUG, "test_fails");
|
||||
|
||||
memset(&resolved_addr, 0, sizeof(resolved_addr));
|
||||
resolved_addr.len = sizeof(struct sockaddr_in);
|
||||
addr->sin_family = AF_INET;
|
||||
|
||||
gpr_mu_lock(g_mu);
|
||||
connections_complete_before = g_connections_complete;
|
||||
gpr_mu_unlock(g_mu);
|
||||
|
||||
/* connect to a broken address */
|
||||
GRPC_CLOSURE_INIT(&done, must_fail, NULL, grpc_schedule_on_exec_ctx);
|
||||
grpc_tcp_client_connect(&done, &g_connecting,
|
||||
grpc_slice_allocator_create_unlimited(), NULL, NULL,
|
||||
&resolved_addr, GRPC_MILLIS_INF_FUTURE);
|
||||
gpr_mu_lock(g_mu);
|
||||
|
||||
/* wait for the connection callback to finish */
|
||||
while (g_connections_complete == connections_complete_before) {
|
||||
grpc_pollset_worker* worker = NULL;
|
||||
gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
|
||||
grpc_millis polling_deadline = test_deadline();
|
||||
switch (grpc_timer_check(&polling_deadline)) {
|
||||
case GRPC_TIMERS_FIRED:
|
||||
break;
|
||||
case GRPC_TIMERS_NOT_CHECKED:
|
||||
polling_deadline = grpc_timespec_to_millis_round_up(now);
|
||||
ABSL_FALLTHROUGH_INTENDED;
|
||||
case GRPC_TIMERS_CHECKED_AND_EMPTY:
|
||||
GPR_ASSERT(GRPC_LOG_IF_ERROR(
|
||||
"pollset_work",
|
||||
grpc_pollset_work(g_pollset, &worker, polling_deadline)));
|
||||
break;
|
||||
}
|
||||
gpr_mu_unlock(g_mu);
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
gpr_mu_lock(g_mu);
|
||||
}
|
||||
|
||||
gpr_mu_unlock(g_mu);
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
}
|
||||
|
||||
static void destroy_pollset(void* p, grpc_error_handle error) {
|
||||
grpc_pollset_destroy(static_cast<grpc_pollset*>(p));
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
grpc_closure destroyed;
|
||||
grpc::testing::TestEnvironment env(argc, argv);
|
||||
grpc_init();
|
||||
{
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
g_pollset = static_cast<grpc_pollset*>(gpr_malloc(grpc_pollset_size()));
|
||||
grpc_pollset_init(g_pollset, &g_mu);
|
||||
|
||||
test_succeeds();
|
||||
gpr_log(GPR_ERROR, "End of first test");
|
||||
test_fails();
|
||||
GRPC_CLOSURE_INIT(&destroyed, destroy_pollset, g_pollset,
|
||||
grpc_schedule_on_exec_ctx);
|
||||
grpc_pollset_shutdown(g_pollset, &destroyed);
|
||||
gpr_free(g_pollset);
|
||||
}
|
||||
grpc_shutdown();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else /* GRPC_UV */
|
||||
|
||||
int main(int /*argc*/, char** /*argv*/) { return 1; }
|
||||
|
||||
#endif /* GRPC_UV */
|
||||
|
|
@ -1,339 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2017 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "src/core/lib/iomgr/port.h"
|
||||
|
||||
// This test won't work except with libuv
|
||||
#ifdef GRPC_UV
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
#include "src/core/lib/iomgr/tcp_server.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <grpc/grpc.h>
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/log.h>
|
||||
#include <grpc/support/sync.h>
|
||||
#include <grpc/support/time.h>
|
||||
|
||||
#include "src/core/lib/address_utils/sockaddr_utils.h"
|
||||
#include "src/core/lib/iomgr/iomgr.h"
|
||||
#include "src/core/lib/iomgr/resolve_address.h"
|
||||
#include "test/core/util/port.h"
|
||||
#include "test/core/util/test_config.h"
|
||||
|
||||
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", #x)
|
||||
|
||||
static gpr_mu* g_mu;
|
||||
static grpc_pollset* g_pollset;
|
||||
static int g_nconnects = 0;
|
||||
|
||||
typedef struct on_connect_result {
|
||||
/* Owns a ref to server. */
|
||||
grpc_tcp_server* server;
|
||||
unsigned port_index;
|
||||
unsigned fd_index;
|
||||
} on_connect_result;
|
||||
|
||||
typedef struct server_weak_ref {
|
||||
grpc_tcp_server* server;
|
||||
|
||||
/* arg is this server_weak_ref. */
|
||||
grpc_closure server_shutdown;
|
||||
} server_weak_ref;
|
||||
|
||||
static on_connect_result g_result = {NULL, 0, 0};
|
||||
|
||||
static void on_connect_result_init(on_connect_result* result) {
|
||||
result->server = NULL;
|
||||
result->port_index = 0;
|
||||
result->fd_index = 0;
|
||||
}
|
||||
|
||||
static void on_connect_result_set(on_connect_result* result,
|
||||
const grpc_tcp_server_acceptor* acceptor) {
|
||||
result->server = grpc_tcp_server_ref(acceptor->from_server);
|
||||
result->port_index = acceptor->port_index;
|
||||
result->fd_index = acceptor->fd_index;
|
||||
}
|
||||
|
||||
static void server_weak_ref_shutdown(void* arg, grpc_error_handle error) {
|
||||
server_weak_ref* weak_ref = static_cast<server_weak_ref*>(arg);
|
||||
weak_ref->server = NULL;
|
||||
}
|
||||
|
||||
static void server_weak_ref_init(server_weak_ref* weak_ref) {
|
||||
weak_ref->server = NULL;
|
||||
GRPC_CLOSURE_INIT(&weak_ref->server_shutdown, server_weak_ref_shutdown,
|
||||
weak_ref, grpc_schedule_on_exec_ctx);
|
||||
}
|
||||
|
||||
/* Make weak_ref->server_shutdown a shutdown_starting cb on server.
|
||||
grpc_tcp_server promises that the server object will live until
|
||||
weak_ref->server_shutdown has returned. A strong ref on grpc_tcp_server
|
||||
should be held until server_weak_ref_set() returns to avoid a race where the
|
||||
server is deleted before the shutdown_starting cb is added. */
|
||||
static void server_weak_ref_set(server_weak_ref* weak_ref,
|
||||
grpc_tcp_server* server) {
|
||||
grpc_tcp_server_shutdown_starting_add(server, &weak_ref->server_shutdown);
|
||||
weak_ref->server = server;
|
||||
}
|
||||
|
||||
static void on_connect(void* arg, grpc_endpoint* tcp, grpc_pollset* pollset,
|
||||
grpc_tcp_server_acceptor* acceptor) {
|
||||
grpc_endpoint_shutdown(tcp,
|
||||
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Connected"));
|
||||
grpc_endpoint_destroy(tcp);
|
||||
|
||||
on_connect_result temp_result;
|
||||
on_connect_result_set(&temp_result, acceptor);
|
||||
gpr_free(acceptor);
|
||||
|
||||
gpr_mu_lock(g_mu);
|
||||
g_result = temp_result;
|
||||
g_nconnects++;
|
||||
GPR_ASSERT(
|
||||
GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL)));
|
||||
gpr_mu_unlock(g_mu);
|
||||
}
|
||||
|
||||
static void test_no_op(void) {
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
grpc_tcp_server* s;
|
||||
GPR_ASSERT(GRPC_ERROR_NONE ==
|
||||
grpc_tcp_server_create(NULL, NULL,
|
||||
grpc_slice_allocator_factory_create(
|
||||
grpc_resource_quota_create(nullptr)),
|
||||
&s));
|
||||
grpc_tcp_server_unref(s);
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
}
|
||||
|
||||
static void test_no_op_with_start(void) {
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
grpc_tcp_server* s;
|
||||
GPR_ASSERT(GRPC_ERROR_NONE ==
|
||||
grpc_tcp_server_create(NULL, NULL,
|
||||
grpc_slice_allocator_factory_create(
|
||||
grpc_resource_quota_create(nullptr)) &
|
||||
s));
|
||||
LOG_TEST("test_no_op_with_start");
|
||||
grpc_tcp_server_start(s, NULL, 0, on_connect, NULL);
|
||||
grpc_tcp_server_unref(s);
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
}
|
||||
|
||||
static void test_no_op_with_port(void) {
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
grpc_resolved_address resolved_addr;
|
||||
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
|
||||
grpc_tcp_server* s;
|
||||
GPR_ASSERT(GRPC_ERROR_NONE ==
|
||||
grpc_tcp_server_create(NULL, NULL,
|
||||
grpc_slice_allocator_factory_create(
|
||||
grpc_resource_quota_create(nullptr)) &
|
||||
s));
|
||||
LOG_TEST("test_no_op_with_port");
|
||||
|
||||
memset(&resolved_addr, 0, sizeof(resolved_addr));
|
||||
resolved_addr.len = sizeof(struct sockaddr_in);
|
||||
addr->sin_family = AF_INET;
|
||||
int port;
|
||||
GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) ==
|
||||
GRPC_ERROR_NONE &&
|
||||
port > 0);
|
||||
|
||||
grpc_tcp_server_unref(s);
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
}
|
||||
|
||||
static void test_no_op_with_port_and_start(void) {
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
grpc_resolved_address resolved_addr;
|
||||
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
|
||||
grpc_tcp_server* s;
|
||||
GPR_ASSERT(GRPC_ERROR_NONE ==
|
||||
grpc_tcp_server_create(NULL, NULL,
|
||||
grpc_slice_allocator_factory_create(
|
||||
grpc_resource_quota_create(nullptr)) &
|
||||
s));
|
||||
LOG_TEST("test_no_op_with_port_and_start");
|
||||
int port;
|
||||
|
||||
memset(&resolved_addr, 0, sizeof(resolved_addr));
|
||||
resolved_addr.len = sizeof(struct sockaddr_in);
|
||||
addr->sin_family = AF_INET;
|
||||
GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) ==
|
||||
GRPC_ERROR_NONE &&
|
||||
port > 0);
|
||||
|
||||
grpc_tcp_server_start(s, NULL, 0, on_connect, NULL);
|
||||
|
||||
grpc_tcp_server_unref(s);
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
}
|
||||
|
||||
static void connect_cb(uv_connect_t* req, int status) {
|
||||
GPR_ASSERT(status == 0);
|
||||
gpr_free(req);
|
||||
}
|
||||
|
||||
static void close_cb(uv_handle_t* handle) { gpr_free(handle); }
|
||||
|
||||
static void tcp_connect(const struct sockaddr* remote, socklen_t remote_len,
|
||||
on_connect_result* result) {
|
||||
gpr_timespec deadline = grpc_timeout_seconds_to_deadline(10);
|
||||
uv_tcp_t* client_handle =
|
||||
static_cast<uv_tcp_t*>(gpr_malloc(sizeof(uv_tcp_t)));
|
||||
uv_connect_t* req =
|
||||
static_cast<uv_connect_t*>(gpr_malloc(sizeof(uv_connect_t)));
|
||||
int nconnects_before;
|
||||
|
||||
gpr_mu_lock(g_mu);
|
||||
nconnects_before = g_nconnects;
|
||||
on_connect_result_init(&g_result);
|
||||
GPR_ASSERT(uv_tcp_init(uv_default_loop(), client_handle) == 0);
|
||||
gpr_log(GPR_DEBUG, "start connect");
|
||||
GPR_ASSERT(uv_tcp_connect(req, client_handle, remote, connect_cb) == 0);
|
||||
gpr_log(GPR_DEBUG, "wait");
|
||||
while (g_nconnects == nconnects_before &&
|
||||
gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) {
|
||||
grpc_pollset_worker* worker = NULL;
|
||||
GPR_ASSERT(GRPC_LOG_IF_ERROR(
|
||||
"pollset_work",
|
||||
grpc_pollset_work(g_pollset, &worker,
|
||||
grpc_timespec_to_millis_round_up(deadline))));
|
||||
gpr_mu_unlock(g_mu);
|
||||
|
||||
gpr_mu_lock(g_mu);
|
||||
}
|
||||
gpr_log(GPR_DEBUG, "wait done");
|
||||
GPR_ASSERT(g_nconnects == nconnects_before + 1);
|
||||
uv_close((uv_handle_t*)client_handle, close_cb);
|
||||
*result = g_result;
|
||||
|
||||
gpr_mu_unlock(g_mu);
|
||||
}
|
||||
|
||||
/* Tests a tcp server with multiple ports. */
|
||||
static void test_connect(unsigned n) {
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
grpc_resolved_address resolved_addr;
|
||||
grpc_resolved_address resolved_addr1;
|
||||
struct sockaddr_storage* addr = (struct sockaddr_storage*)resolved_addr.addr;
|
||||
struct sockaddr_storage* addr1 =
|
||||
(struct sockaddr_storage*)resolved_addr1.addr;
|
||||
int svr_port;
|
||||
int svr1_port;
|
||||
grpc_tcp_server* s;
|
||||
GPR_ASSERT(GRPC_ERROR_NONE ==
|
||||
grpc_tcp_server_create(NULL, NULL,
|
||||
grpc_slice_allocator_factory_create(
|
||||
grpc_resource_quota_create(nullptr)) &
|
||||
s));
|
||||
unsigned i;
|
||||
server_weak_ref weak_ref;
|
||||
server_weak_ref_init(&weak_ref);
|
||||
LOG_TEST("test_connect");
|
||||
gpr_log(GPR_INFO, "clients=%d", n);
|
||||
memset(&resolved_addr, 0, sizeof(resolved_addr));
|
||||
memset(&resolved_addr1, 0, sizeof(resolved_addr1));
|
||||
resolved_addr.len = sizeof(struct sockaddr_storage);
|
||||
resolved_addr1.len = sizeof(struct sockaddr_storage);
|
||||
addr->ss_family = addr1->ss_family = AF_INET;
|
||||
GPR_ASSERT(GRPC_ERROR_NONE ==
|
||||
grpc_tcp_server_add_port(s, &resolved_addr, &svr_port));
|
||||
GPR_ASSERT(svr_port > 0);
|
||||
GPR_ASSERT((uv_ip6_addr("::", svr_port, (struct sockaddr_in6*)addr)) == 0);
|
||||
/* Cannot use wildcard (port==0), because add_port() will try to reuse the
|
||||
same port as a previous add_port(). */
|
||||
svr1_port = grpc_pick_unused_port_or_die();
|
||||
grpc_sockaddr_set_port(&resolved_addr1, svr1_port);
|
||||
GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr1, &svr_port) ==
|
||||
GRPC_ERROR_NONE &&
|
||||
svr_port == svr1_port);
|
||||
|
||||
grpc_tcp_server_start(s, &g_pollset, 1, on_connect, NULL);
|
||||
|
||||
GPR_ASSERT(uv_ip6_addr("::", svr_port, (struct sockaddr_in6*)addr1) == 0);
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
on_connect_result result;
|
||||
on_connect_result_init(&result);
|
||||
tcp_connect((struct sockaddr*)addr, (socklen_t)resolved_addr.len, &result);
|
||||
GPR_ASSERT(result.port_index == 0);
|
||||
GPR_ASSERT(result.server == s);
|
||||
if (weak_ref.server == NULL) {
|
||||
server_weak_ref_set(&weak_ref, result.server);
|
||||
}
|
||||
grpc_tcp_server_unref(result.server);
|
||||
|
||||
on_connect_result_init(&result);
|
||||
tcp_connect((struct sockaddr*)addr1, (socklen_t)resolved_addr1.len,
|
||||
&result);
|
||||
GPR_ASSERT(result.port_index == 1);
|
||||
GPR_ASSERT(result.server == s);
|
||||
grpc_tcp_server_unref(result.server);
|
||||
}
|
||||
|
||||
/* Weak ref to server valid until final unref. */
|
||||
GPR_ASSERT(weak_ref.server != NULL);
|
||||
|
||||
grpc_tcp_server_unref(s);
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
/* Weak ref lost. */
|
||||
GPR_ASSERT(weak_ref.server == NULL);
|
||||
}
|
||||
|
||||
static void destroy_pollset(void* p, grpc_error_handle error) {
|
||||
grpc_pollset_destroy(static_cast<grpc_pollset*>(p));
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
grpc_closure destroyed;
|
||||
grpc::testing::TestEnvironment env(argc, argv);
|
||||
grpc_init();
|
||||
{
|
||||
grpc_core::ExecCtx exec_ctx;
|
||||
g_pollset = static_cast<grpc_pollset*>(gpr_malloc(grpc_pollset_size()));
|
||||
grpc_pollset_init(g_pollset, &g_mu);
|
||||
|
||||
test_no_op();
|
||||
test_no_op_with_start();
|
||||
test_no_op_with_port();
|
||||
test_no_op_with_port_and_start();
|
||||
test_connect(1);
|
||||
test_connect(10);
|
||||
|
||||
GRPC_CLOSURE_INIT(&destroyed, destroy_pollset, g_pollset,
|
||||
grpc_schedule_on_exec_ctx);
|
||||
grpc_pollset_shutdown(g_pollset, &destroyed);
|
||||
|
||||
gpr_free(g_pollset);
|
||||
}
|
||||
grpc_shutdown();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else /* GRPC_UV */
|
||||
|
||||
int main(int /*argc*/, char** /*argv*/) { return 1; }
|
||||
|
||||
#endif /* GRPC_UV */
|
||||
|
|
@ -16,10 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when
|
||||
using that endpoint. Because of various transitive includes in uv.h,
|
||||
including windows.h on Windows, uv.h must be included before other system
|
||||
headers. Therefore, sockaddr.h must always be included first */
|
||||
#include "src/core/lib/iomgr/sockaddr.h"
|
||||
|
||||
#include <memory.h>
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ TEST(ServerChttp2, UnparseableTarget) {
|
|||
grpc_server_destroy(server);
|
||||
}
|
||||
|
||||
// GRPC_ARG_ALLOW_REUSEPORT isn't supported for custom servers
|
||||
#ifndef GRPC_UV
|
||||
TEST(ServerChttp2, AddSamePortTwice) {
|
||||
grpc_arg a = grpc_channel_arg_integer_create(
|
||||
const_cast<char*>(GRPC_ARG_ALLOW_REUSEPORT), 0);
|
||||
|
|
@ -64,7 +62,6 @@ TEST(ServerChttp2, AddSamePortTwice) {
|
|||
grpc_server_destroy(server);
|
||||
grpc_completion_queue_destroy(cq);
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
grpc::testing::TestEnvironment env(argc, argv);
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@ void test_request_call_on_no_server_cq(void) {
|
|||
grpc_server_destroy(server);
|
||||
}
|
||||
|
||||
// GRPC_ARG_ALLOW_REUSEPORT isn't supported for custom servers
|
||||
#ifndef GRPC_UV
|
||||
void test_bind_server_twice(void) {
|
||||
grpc_arg a = grpc_channel_arg_integer_create(
|
||||
const_cast<char*>(GRPC_ARG_ALLOW_REUSEPORT), 0);
|
||||
|
|
@ -104,7 +102,6 @@ void test_bind_server_twice(void) {
|
|||
grpc_server_destroy(server2);
|
||||
grpc_completion_queue_destroy(cq);
|
||||
}
|
||||
#endif
|
||||
|
||||
void test_bind_server_to_addr(const char* host, bool secure) {
|
||||
int port = grpc_pick_unused_port_or_die();
|
||||
|
|
@ -153,9 +150,7 @@ int main(int argc, char** argv) {
|
|||
grpc_init();
|
||||
test_register_method_fail();
|
||||
test_request_call_on_no_server_cq();
|
||||
#ifndef GRPC_UV
|
||||
test_bind_server_twice();
|
||||
#endif
|
||||
|
||||
static const char* addrs[] = {
|
||||
"::1", "127.0.0.1", "::ffff:127.0.0.1", "localhost", "0.0.0.0", "::",
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when
|
||||
using that endpoint. Because of various transitive includes in uv.h,
|
||||
including windows.h on Windows, uv.h must be included before other system
|
||||
headers. Therefore, sockaddr.h must always be included first */
|
||||
#include "src/core/lib/iomgr/sockaddr.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when
|
||||
using that endpoint. Because of various transitive includes in uv.h,
|
||||
including windows.h on Windows, uv.h must be included before other system
|
||||
headers. Therefore, sockaddr.h must always be included first */
|
||||
#include "src/core/lib/iomgr/sockaddr.h"
|
||||
|
||||
#include "test/core/util/passthru_endpoint.h"
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ def mako_plugin(dictionary):
|
|||
tests.append({
|
||||
'name': new_target['name'],
|
||||
'args': [fn],
|
||||
'exclude_iomgrs': ['uv'],
|
||||
'exclude_configs': ['tsan'],
|
||||
'uses_polling': False,
|
||||
'platforms': ['mac', 'linux'],
|
||||
|
|
|
|||
|
|
@ -1115,13 +1115,11 @@ src/core/ext/filters/client_channel/resolver.h \
|
|||
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc \
|
||||
|
|
@ -1824,7 +1822,6 @@ src/core/lib/iomgr/endpoint_cfstream.h \
|
|||
src/core/lib/iomgr/endpoint_pair.h \
|
||||
src/core/lib/iomgr/endpoint_pair_event_engine.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_posix.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_uv.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_windows.cc \
|
||||
src/core/lib/iomgr/error.cc \
|
||||
src/core/lib/iomgr/error.h \
|
||||
|
|
@ -1885,7 +1882,6 @@ src/core/lib/iomgr/iomgr_internal.cc \
|
|||
src/core/lib/iomgr/iomgr_internal.h \
|
||||
src/core/lib/iomgr/iomgr_posix.cc \
|
||||
src/core/lib/iomgr/iomgr_posix_cfstream.cc \
|
||||
src/core/lib/iomgr/iomgr_uv.cc \
|
||||
src/core/lib/iomgr/iomgr_windows.cc \
|
||||
src/core/lib/iomgr/is_epollexclusive_available.cc \
|
||||
src/core/lib/iomgr/is_epollexclusive_available.h \
|
||||
|
|
@ -1906,8 +1902,6 @@ src/core/lib/iomgr/pollset_set_custom.cc \
|
|||
src/core/lib/iomgr/pollset_set_custom.h \
|
||||
src/core/lib/iomgr/pollset_set_windows.cc \
|
||||
src/core/lib/iomgr/pollset_set_windows.h \
|
||||
src/core/lib/iomgr/pollset_uv.cc \
|
||||
src/core/lib/iomgr/pollset_uv.h \
|
||||
src/core/lib/iomgr/pollset_windows.cc \
|
||||
src/core/lib/iomgr/pollset_windows.h \
|
||||
src/core/lib/iomgr/port.h \
|
||||
|
|
@ -1921,7 +1915,6 @@ src/core/lib/iomgr/resolve_address_windows.cc \
|
|||
src/core/lib/iomgr/resource_quota.cc \
|
||||
src/core/lib/iomgr/resource_quota.h \
|
||||
src/core/lib/iomgr/sockaddr.h \
|
||||
src/core/lib/iomgr/sockaddr_custom.h \
|
||||
src/core/lib/iomgr/sockaddr_posix.h \
|
||||
src/core/lib/iomgr/sockaddr_windows.h \
|
||||
src/core/lib/iomgr/socket_factory_posix.cc \
|
||||
|
|
@ -1933,7 +1926,6 @@ src/core/lib/iomgr/socket_utils_common_posix.cc \
|
|||
src/core/lib/iomgr/socket_utils_linux.cc \
|
||||
src/core/lib/iomgr/socket_utils_posix.cc \
|
||||
src/core/lib/iomgr/socket_utils_posix.h \
|
||||
src/core/lib/iomgr/socket_utils_uv.cc \
|
||||
src/core/lib/iomgr/socket_utils_windows.cc \
|
||||
src/core/lib/iomgr/socket_windows.cc \
|
||||
src/core/lib/iomgr/socket_windows.h \
|
||||
|
|
@ -1958,7 +1950,6 @@ src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
|
|||
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_windows.cc \
|
||||
src/core/lib/iomgr/tcp_uv.cc \
|
||||
src/core/lib/iomgr/tcp_windows.cc \
|
||||
src/core/lib/iomgr/tcp_windows.h \
|
||||
src/core/lib/iomgr/time_averaged_stats.cc \
|
||||
|
|
@ -1973,7 +1964,6 @@ src/core/lib/iomgr/timer_heap.cc \
|
|||
src/core/lib/iomgr/timer_heap.h \
|
||||
src/core/lib/iomgr/timer_manager.cc \
|
||||
src/core/lib/iomgr/timer_manager.h \
|
||||
src/core/lib/iomgr/timer_uv.cc \
|
||||
src/core/lib/iomgr/udp_server.cc \
|
||||
src/core/lib/iomgr/udp_server.h \
|
||||
src/core/lib/iomgr/unix_sockets_posix.cc \
|
||||
|
|
|
|||
|
|
@ -940,13 +940,11 @@ src/core/ext/filters/client_channel/resolver/README.md \
|
|||
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc \
|
||||
|
|
@ -1664,7 +1662,6 @@ src/core/lib/iomgr/endpoint_cfstream.h \
|
|||
src/core/lib/iomgr/endpoint_pair.h \
|
||||
src/core/lib/iomgr/endpoint_pair_event_engine.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_posix.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_uv.cc \
|
||||
src/core/lib/iomgr/endpoint_pair_windows.cc \
|
||||
src/core/lib/iomgr/error.cc \
|
||||
src/core/lib/iomgr/error.h \
|
||||
|
|
@ -1725,7 +1722,6 @@ src/core/lib/iomgr/iomgr_internal.cc \
|
|||
src/core/lib/iomgr/iomgr_internal.h \
|
||||
src/core/lib/iomgr/iomgr_posix.cc \
|
||||
src/core/lib/iomgr/iomgr_posix_cfstream.cc \
|
||||
src/core/lib/iomgr/iomgr_uv.cc \
|
||||
src/core/lib/iomgr/iomgr_windows.cc \
|
||||
src/core/lib/iomgr/is_epollexclusive_available.cc \
|
||||
src/core/lib/iomgr/is_epollexclusive_available.h \
|
||||
|
|
@ -1746,8 +1742,6 @@ src/core/lib/iomgr/pollset_set_custom.cc \
|
|||
src/core/lib/iomgr/pollset_set_custom.h \
|
||||
src/core/lib/iomgr/pollset_set_windows.cc \
|
||||
src/core/lib/iomgr/pollset_set_windows.h \
|
||||
src/core/lib/iomgr/pollset_uv.cc \
|
||||
src/core/lib/iomgr/pollset_uv.h \
|
||||
src/core/lib/iomgr/pollset_windows.cc \
|
||||
src/core/lib/iomgr/pollset_windows.h \
|
||||
src/core/lib/iomgr/port.h \
|
||||
|
|
@ -1761,7 +1755,6 @@ src/core/lib/iomgr/resolve_address_windows.cc \
|
|||
src/core/lib/iomgr/resource_quota.cc \
|
||||
src/core/lib/iomgr/resource_quota.h \
|
||||
src/core/lib/iomgr/sockaddr.h \
|
||||
src/core/lib/iomgr/sockaddr_custom.h \
|
||||
src/core/lib/iomgr/sockaddr_posix.h \
|
||||
src/core/lib/iomgr/sockaddr_windows.h \
|
||||
src/core/lib/iomgr/socket_factory_posix.cc \
|
||||
|
|
@ -1773,7 +1766,6 @@ src/core/lib/iomgr/socket_utils_common_posix.cc \
|
|||
src/core/lib/iomgr/socket_utils_linux.cc \
|
||||
src/core/lib/iomgr/socket_utils_posix.cc \
|
||||
src/core/lib/iomgr/socket_utils_posix.h \
|
||||
src/core/lib/iomgr/socket_utils_uv.cc \
|
||||
src/core/lib/iomgr/socket_utils_windows.cc \
|
||||
src/core/lib/iomgr/socket_windows.cc \
|
||||
src/core/lib/iomgr/socket_windows.h \
|
||||
|
|
@ -1798,7 +1790,6 @@ src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
|
|||
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_windows.cc \
|
||||
src/core/lib/iomgr/tcp_uv.cc \
|
||||
src/core/lib/iomgr/tcp_windows.cc \
|
||||
src/core/lib/iomgr/tcp_windows.h \
|
||||
src/core/lib/iomgr/time_averaged_stats.cc \
|
||||
|
|
@ -1813,7 +1804,6 @@ src/core/lib/iomgr/timer_heap.cc \
|
|||
src/core/lib/iomgr/timer_heap.h \
|
||||
src/core/lib/iomgr/timer_manager.cc \
|
||||
src/core/lib/iomgr/timer_manager.h \
|
||||
src/core/lib/iomgr/timer_uv.cc \
|
||||
src/core/lib/iomgr/udp_server.cc \
|
||||
src/core/lib/iomgr/udp_server.h \
|
||||
src/core/lib/iomgr/unix_sockets_posix.cc \
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -273,23 +273,6 @@ class CLanguage(object):
|
|||
# see https://github.com/grpc/grpc/blob/b5b8578b3f8b4a9ce61ed6677e19d546e43c5c68/tools/run_tests/artifacts/artifact_targets.py#L253
|
||||
self._cmake_configure_extra_args.append('-DOPENSSL_NO_ASM=ON')
|
||||
|
||||
if args.iomgr_platform == "uv":
|
||||
cflags = '-DGRPC_UV -DGRPC_CUSTOM_IOMGR_THREAD_CHECK -DGRPC_CUSTOM_SOCKET '
|
||||
try:
|
||||
cflags += subprocess.check_output(
|
||||
['pkg-config', '--cflags', 'libuv']).strip() + ' '
|
||||
except (subprocess.CalledProcessError, OSError):
|
||||
pass
|
||||
try:
|
||||
ldflags = subprocess.check_output(
|
||||
['pkg-config', '--libs', 'libuv']).strip() + ' '
|
||||
except (subprocess.CalledProcessError, OSError):
|
||||
ldflags = '-luv '
|
||||
self._make_options += [
|
||||
'EXTRA_CPPFLAGS={}'.format(cflags),
|
||||
'EXTRA_LDLIBS={}'.format(ldflags)
|
||||
]
|
||||
|
||||
def test_specs(self):
|
||||
out = []
|
||||
binaries = get_c_tests(self.args.travis, self.test_lang)
|
||||
|
|
@ -301,8 +284,6 @@ class CLanguage(object):
|
|||
polling_strategies = (_POLLING_STRATEGIES.get(
|
||||
self.platform, ['all']) if target.get('uses_polling', True) else
|
||||
['none'])
|
||||
if self.args.iomgr_platform == 'uv':
|
||||
polling_strategies = ['all']
|
||||
for polling_strategy in polling_strategies:
|
||||
env = {
|
||||
'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH':
|
||||
|
|
@ -1464,7 +1445,7 @@ argp.add_argument(
|
|||
'Selects compiler to use. Allowed values depend on the platform and language.'
|
||||
)
|
||||
argp.add_argument('--iomgr_platform',
|
||||
choices=['native', 'uv', 'gevent', 'asyncio'],
|
||||
choices=['native', 'gevent', 'asyncio'],
|
||||
default='native',
|
||||
help='Selects iomgr platform to build on')
|
||||
argp.add_argument('--build_only',
|
||||
|
|
|
|||
|
|
@ -340,19 +340,6 @@ def _create_portability_test_jobs(extra_args=[],
|
|||
['--report_multi_target'],
|
||||
inner_jobs=inner_jobs)
|
||||
|
||||
# TODO(jtattermusch): a large portion of the libuv tests is failing,
|
||||
# which can end up killing the kokoro job due to gigabytes of error logs
|
||||
# generated. Remove the --build_only flag
|
||||
# once https://github.com/grpc/grpc/issues/17556 is fixed.
|
||||
test_jobs += _generate_jobs(languages=['c'],
|
||||
configs=['dbg'],
|
||||
platforms=['linux'],
|
||||
iomgr_platforms=['uv'],
|
||||
labels=['portability', 'corelang'],
|
||||
extra_args=extra_args + ['--build_only'],
|
||||
inner_jobs=inner_jobs,
|
||||
timeout_seconds=_CPP_RUNTESTS_TIMEOUT)
|
||||
|
||||
return test_jobs
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue