Home
last modified time | relevance | path

Searched refs:asocket (Results 1 – 17 of 17) sorted by relevance

/packages/modules/adb/
Dsocket.h58 struct asocket { struct
83 asocket* peer = nullptr; argument
91 int (*enqueue)(asocket* s, apacket::payload_type data) = nullptr; argument
96 void (*ready)(asocket* s) = nullptr; argument
102 void (*shutdown)(asocket* s) = nullptr; argument
108 void (*close)(asocket* s) = nullptr; argument
137 asocket *find_local_socket(unsigned local_id, unsigned remote_id); argument
138 void install_local_socket(asocket *s);
139 void remove_socket(asocket *s);
142 void local_socket_ack(asocket* s, std::optional<int32_t> acked_bytes);
[all …]
Dsockets.cpp53 static auto& local_socket_list = *new std::vector<asocket*>();
59 static auto& local_socket_closing_list = *new std::vector<asocket*>();
64 asocket* find_local_socket(unsigned local_id, unsigned peer_id) { in find_local_socket()
65 asocket* result = nullptr; in find_local_socket()
68 for (asocket* s : local_socket_list) { in find_local_socket()
81 void install_local_socket(asocket* s) { in install_local_socket()
94 void remove_socket(asocket* s) { in remove_socket()
97 list->erase(std::remove_if(list->begin(), list->end(), [s](asocket* x) { return x == s; }), in remove_socket()
108 for (asocket* s : local_socket_list) { in close_all_sockets()
122 static SocketFlushResult local_socket_flush_incoming(asocket* s) { in local_socket_flush_incoming()
[all …]
Dsocket_test.cpp62 asocket* prev_tail = create_local_socket(unique_fd(first[1])); in TEST_F()
65 auto connect = [](asocket* tail, asocket* head) { in TEST_F()
74 asocket* head = create_local_socket(unique_fd(intermediate[0])); in TEST_F()
77 asocket* tail = create_local_socket(unique_fd(intermediate[1])); in TEST_F()
84 asocket* end = create_local_socket(unique_fd(last[0])); in TEST_F()
115 asocket* s = create_local_socket(std::move(arg->socket_fd)); in CreateCloser()
141 asocket* cause_close_s = create_local_socket(std::move(arg->cause_close_fd)); in CreateCloser()
243 asocket* head = create_local_socket(unique_fd(head_fd[1])); in TEST_F()
244 asocket* tail = create_local_socket(unique_fd(tail_fd[1])); in TEST_F()
298 asocket* s = create_local_socket(unique_fd(accept_fd)); in TEST_F()
Dadb.h162 asocket* host_service_to_socket(std::string_view name, std::string_view serial,
167 asocket* daemon_service_to_socket(std::string_view name, atransport* transport);
228 asocket* s);
Dadb_listeners.cpp88 asocket* s = create_local_socket(std::move(fd)); in ss_listener_event_func()
107 asocket* s = create_local_socket(std::move(fd)); in listener_event_func()
Dtransport.cpp612 asocket socket;
636 static void device_tracker_close(asocket* socket) { in device_tracker_close()
638 asocket* peer = socket->peer; in device_tracker_close()
649 static int device_tracker_enqueue(asocket* socket, apacket::payload_type) { in device_tracker_enqueue()
656 asocket* peer = tracker->socket.peer; in device_tracker_send()
667 static void device_tracker_ready(asocket* socket) { in device_tracker_ready()
678 asocket* create_device_tracker(TrackerOutputType output_type) { in create_device_tracker()
Dadb.cpp530 asocket* s = create_local_service_socket(address, t); in handle_packet()
556 asocket* s = find_local_socket(p->msg.arg1, 0); in handle_packet()
596 asocket* s = find_local_socket(p->msg.arg1, p->msg.arg0); in handle_packet()
620 asocket* s = find_local_socket(p->msg.arg1, p->msg.arg0); in handle_packet()
1277 asocket* s) { in handle_host_request()
Dservices.cpp250 asocket* host_service_to_socket(std::string_view name, std::string_view serial, in host_service_to_socket()
Dtransport.h538 asocket* create_device_tracker(TrackerOutputType type);
/packages/modules/adb/daemon/
Djdwp_service.cpp386 struct JdwpSocket : public asocket {
390 static void jdwp_socket_close(asocket* s) { in jdwp_socket_close()
404 static int jdwp_socket_enqueue(asocket* s, apacket::payload_type) { in jdwp_socket_enqueue()
411 static void jdwp_socket_ready(asocket* s) { in jdwp_socket_ready()
413 asocket* peer = jdwp->peer; in jdwp_socket_ready()
430 asocket* create_jdwp_service_socket() { in create_jdwp_service_socket()
452 struct JdwpTracker : public asocket {
490 static void jdwp_tracker_close(asocket* s) { in jdwp_tracker_close()
507 static void jdwp_tracker_ready(asocket* s) { in jdwp_tracker_ready()
519 static int jdwp_tracker_enqueue(asocket* s, apacket::payload_type) { in jdwp_tracker_enqueue()
[all …]
Djdwp_service.h23 asocket* create_jdwp_service_socket();
24 asocket* create_jdwp_tracker_service_socket();
25 asocket* create_app_tracker_service_socket();
Dservices.cpp167 struct ServiceSocket : public asocket {
173 this->enqueue = [](asocket* self, apacket::payload_type data) { in ServiceSocket()
178 this->ready = [](asocket* self) { return static_cast<ServiceSocket*>(self)->Ready(); }; in ServiceSocket()
179 this->close = [](asocket* self) { return static_cast<ServiceSocket*>(self)->Close(); }; in ServiceSocket()
252 asocket* daemon_service_to_socket(std::string_view name, atransport* transport) { in daemon_service_to_socket()
/packages/modules/adb/docs/dev/
Dasocket.md3 The data structure of asocket, with their queue, amessage, and apackets are described
4 in [internals.md](internals.md). But understanding asocket, how they are used, and how they are
7 ## Why ADB needs asocket
9 The concept of `asocket` was created to achieve two things.
15 but TCP multiplexing was not leveraged. Even when using TCP, a transport still uses `asocket`
18 ## Data direction and asocket peers
20 - A asocket is uni-directional. It only allows data to be `enqueue`d.
21 - A asocket is paired with a peer asocket which handles traffic in the opposite direction.
23 ## Types of asocket
25 There are several types of `asocket`. Some are easy to understand because they
[all …]
Ddelayed_ack.md6 2. There could be only one `A_WRTE` apacket in-flight on an asocket. A local asocket
19 The idea is to introduce the concept of a per-asocket "available send bytes" (ASB) integer.
23 While the ASB is positive, the asocket does not wait for an `A_OKAY` before sending
24 more `A_WRTE` apackets. A remote asocket can be written to up until the ASB is exhausted.
31 to allow several `A_WRTE` packets to be in-flight on an asocket. This greatly
Dinternals.md66asocket, apacket, and amessage constructs exist only to wrap data while it transits on a Transport…
68 An asocket features a buffer containing apackets. If traffic is inbound, the buffer stores the apac…
93 The two types of asocket (Remote and Local) differentiate between outbound and inbound traffic.
DREADME.md6 - [Understanding asocket](asocket.md)
Droot.md29 The trick is done by tagging any asocket associated with a `root`/`unroot` command to call `exit(3)…
30 asocket they run upon is closed (see `exit_on_close`).