Home
last modified time | relevance | path

Searched refs:listen_fd (Results 1 – 3 of 3) sorted by relevance

/system/bt/vendor_libs/test_vendor_lib/src/
Dtest_channel_transport.cc40 int listen_fd = -1; in SetUp() local
45 if ((listen_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { in SetUp()
55 if (bind(listen_fd, reinterpret_cast<sockaddr*>(&listen_address), in SetUp()
58 close(listen_fd); in SetUp()
62 if (listen(listen_fd, 1) < 0) { in SetUp()
64 close(listen_fd); in SetUp()
69 accept(listen_fd, reinterpret_cast<sockaddr*>(&test_channel_address), in SetUp()
72 close(listen_fd); in SetUp()
/system/update_engine/
Dtest_http_server.cc583 int listen_fd = socket(AF_INET, SOCK_STREAM, 0); in main() local
584 if (listen_fd < 0) in main()
595 if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &tr, in main()
603 if (bind(listen_fd, reinterpret_cast<struct sockaddr *>(&server_addr), in main()
608 if (listen(listen_fd, 5) < 0) { in main()
616 if (getsockname(listen_fd, reinterpret_cast<struct sockaddr*>(&bound_addr), in main()
640 int client_fd = accept(listen_fd, nullptr, nullptr); in main()
/system/core/adb/
Dsocket_test.cpp242 int listen_fd = network_inaddr_any_server(5038, SOCK_STREAM, &error); in TEST_F() local
243 ASSERT_GE(listen_fd, 0); in TEST_F()
252 int accept_fd = adb_socket_accept(listen_fd, &addr, &alen); in TEST_F()