iomgr_posix.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
20 
22 
23 #ifdef GRPC_POSIX_SOCKET_IOMGR
24 
34 
35 extern grpc_tcp_server_vtable grpc_posix_tcp_server_vtable;
36 extern grpc_tcp_client_vtable grpc_posix_tcp_client_vtable;
38 extern grpc_pollset_vtable grpc_posix_pollset_vtable;
39 extern grpc_pollset_set_vtable grpc_posix_pollset_set_vtable;
40 
41 static void iomgr_platform_init(void) {
44  grpc_tcp_posix_init();
45 }
46 
47 static void iomgr_platform_flush(void) {}
48 
49 static void iomgr_platform_shutdown(void) {
50  grpc_tcp_posix_shutdown();
53 }
54 
55 static void iomgr_platform_shutdown_background_closure(void) {
57 }
58 
59 static bool iomgr_platform_is_any_background_poller_thread(void) {
61 }
62 
63 static bool iomgr_platform_add_closure_to_background_poller(
66 }
67 
69  iomgr_platform_init,
70  iomgr_platform_flush,
71  iomgr_platform_shutdown,
72  iomgr_platform_shutdown_background_closure,
73  iomgr_platform_is_any_background_poller_thread,
74  iomgr_platform_add_closure_to_background_poller};
75 
77  grpc_set_tcp_client_impl(&grpc_posix_tcp_client_vtable);
78  grpc_set_tcp_server_impl(&grpc_posix_tcp_server_vtable);
80  grpc_set_pollset_vtable(&grpc_posix_pollset_vtable);
81  grpc_set_pollset_set_vtable(&grpc_posix_pollset_set_vtable);
85 }
86 
89 }
90 
91 #endif /* GRPC_POSIX_SOCKET_IOMGR */
trace.h
grpc_pollset_vtable
Definition: pollset.h:41
vtable
static const grpc_transport_vtable vtable
Definition: binder_transport.cc:680
iomgr_internal.h
grpc_timer_vtable
Definition: iomgr/timer.h:61
resolve_address.h
error
grpc_error_handle error
Definition: retry_filter.cc:499
grpc_event_engine_shutdown
void grpc_event_engine_shutdown(void)
grpc_pollset_set_vtable
Definition: pollset_set.h:32
grpc_set_default_iomgr_platform
void grpc_set_default_iomgr_platform()
Definition: memory_quota_test.cc:167
grpc_set_timer_impl
void grpc_set_timer_impl(grpc_timer_vtable *vtable)
Definition: iomgr/timer.cc:27
grpc_set_iomgr_platform_vtable
void grpc_set_iomgr_platform_vtable(grpc_iomgr_platform_vtable *vtable)
Definition: iomgr_internal.cc:31
grpc_iomgr_run_in_background
bool grpc_iomgr_run_in_background()
grpc_add_closure_to_background_poller
bool grpc_add_closure_to_background_poller(grpc_closure *closure, grpc_error_handle error)
ev_posix.h
grpc_set_tcp_client_impl
void grpc_set_tcp_client_impl(grpc_tcp_client_vtable *impl)
Definition: tcp_client.cc:39
resolve_address_posix.h
tcp_posix.h
grpc_set_pollset_vtable
void grpc_set_pollset_vtable(grpc_pollset_vtable *vtable)
Definition: pollset.cc:25
tcp_client.h
grpc_event_engine_run_in_background
bool grpc_event_engine_run_in_background()
grpc_wakeup_fd_global_init
void grpc_wakeup_fd_global_init(void)
grpc_event_engine_init
void grpc_event_engine_init(void)
grpc_set_pollset_set_vtable
void grpc_set_pollset_set_vtable(grpc_pollset_set_vtable *vtable)
Definition: pollset_set.cc:25
grpc_shutdown_background_closure
void grpc_shutdown_background_closure()
port.h
grpc_core::SetDNSResolver
void SetDNSResolver(DNSResolver *resolver)
Definition: resolve_address.cc:36
grpc_generic_timer_vtable
grpc_timer_vtable grpc_generic_timer_vtable
Definition: timer_generic.cc:735
closure
Definition: proxy.cc:59
grpc_wakeup_fd_global_destroy
void grpc_wakeup_fd_global_destroy(void)
timer.h
grpc_tcp_client_global_init
void grpc_tcp_client_global_init()
grpc_tcp_client_vtable
Definition: tcp_client.h:32
grpc_is_any_background_poller_thread
bool grpc_is_any_background_poller_thread()
grpc_error
Definition: error_internal.h:42
tcp_server.h
grpc_closure
Definition: closure.h:56
grpc_set_tcp_server_impl
void grpc_set_tcp_server_impl(grpc_tcp_server_vtable *impl)
Definition: tcp_server.cc:75
grpc_tcp_server_vtable
Definition: tcp_server.h:65
grpc_core::NativeDNSResolver::GetOrCreate
static NativeDNSResolver * GetOrCreate()
grpc_iomgr_platform_vtable
Definition: iomgr_internal.h:35
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:08