Home
last modified time | relevance | path

Searched refs:server_fd (Results 1 – 8 of 8) sorted by relevance

/packages/modules/Virtualization/tests/benchmark/src/native/
Dio_vsock.cpp29 int server_fd(TEMP_FAILURE_RETRY(socket(AF_VSOCK, SOCK_STREAM | SOCK_CLOEXEC, 0))); in init_vsock_server() local
30 if (server_fd < 0) { in init_vsock_server()
39 int ret = TEMP_FAILURE_RETRY(bind(server_fd, (struct sockaddr *)&server_sa, sizeof(server_sa))); in init_vsock_server()
43 ret = TEMP_FAILURE_RETRY(listen(server_fd, /*backlog=*/1)); in init_vsock_server()
48 return server_fd; in init_vsock_server()
51 Result<void> run_vsock_server_and_receive_data(int server_fd, int num_bytes_to_receive) { in run_vsock_server_and_receive_data() argument
56 accept4(server_fd, (struct sockaddr *)&client_sa, &client_sa_len, SOCK_CLOEXEC))); in run_vsock_server_and_receive_data()
Dbenchmarkbinary.cpp93 ndk::ScopedAStatus runVsockServerAndReceiveData(int32_t server_fd, in runVsockServerAndReceiveData() argument
95 auto res = io_vsock::run_vsock_server_and_receive_data(server_fd, num_bytes_to_receive); in runVsockServerAndReceiveData()
/packages/modules/Virtualization/virtualizationmanager/
Dfuzzer.cpp42 unique_fd server_fd, client_fd; in get_service_fd() local
43 if (!Socketpair(SOCK_STREAM, &server_fd, &client_fd)) { in get_service_fd()
56 auto server_fd_str = std::to_string(server_fd.get()); in get_service_fd()
67 server_fd.reset(); in get_service_fd()
/packages/modules/adb/
Dsocket_spec_test.cpp214 unique_fd server_fd, client_fd; in TEST() local
216 server_fd.reset(socket_spec_listen("tcp:7777", &error, &port)); in TEST()
217 EXPECT_NE(server_fd.get(), -1); in TEST()
238 unique_fd server_fd, client_fd; in TEST() local
247 server_fd.reset(socket_spec_listen(sock_addr, &error, &port)); in TEST()
249 EXPECT_NE(server_fd.get(), -1); in TEST()
/packages/modules/Virtualization/tests/testapk/src/native/
Dtestbinary.cpp119 unique_fd server_fd{TEMP_FAILURE_RETRY(socket(AF_VSOCK, SOCK_STREAM | SOCK_CLOEXEC, 0))}; in start_echo_reverse_server() local
120 if (!server_fd.ok()) { in start_echo_reverse_server()
128 int ret = TEMP_FAILURE_RETRY(bind(server_fd, (struct sockaddr*)&server_sa, sizeof(server_sa))); in start_echo_reverse_server()
132 ret = TEMP_FAILURE_RETRY(listen(server_fd, /*backlog=*/1)); in start_echo_reverse_server()
137 std::thread accept_thread{[listening_fd = std::move(server_fd)] { in start_echo_reverse_server()
/packages/modules/Virtualization/vmclient/src/
Dlib.rs90 let (client_fd, server_fd) = posix_socketpair()?; in new()
93 command.arg("--rpc-server-fd").arg(format!("{}", server_fd.as_raw_fd())); in new()
95 command.preserved_fds(vec![server_fd.as_raw_fd(), ready_fd.as_raw_fd()]); in new()
100 drop(server_fd); in new()
/packages/modules/Virtualization/demo_native/
Dmain.cpp81 unique_fd server_fd, client_fd; in get_service_fd() local
82 if (!Socketpair(SOCK_STREAM, &server_fd, &client_fd)) { in get_service_fd()
95 auto server_fd_str = std::to_string(server_fd.get()); in get_service_fd()
104 server_fd.reset(); in get_service_fd()
/packages/modules/Virtualization/tests/benchmark/src/native/include/
Dio_vsock.h24 Result<void> run_vsock_server_and_receive_data(int server_fd, int num_bytes_to_receive);