/packages/modules/adb/ |
D | socket.h | 58 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 …]
|
D | sockets.cpp | 53 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 …]
|
D | socket_test.cpp | 62 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()
|
D | adb.h | 162 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);
|
D | adb_listeners.cpp | 88 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()
|
D | transport.cpp | 612 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()
|
D | adb.cpp | 530 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()
|
D | services.cpp | 250 asocket* host_service_to_socket(std::string_view name, std::string_view serial, in host_service_to_socket()
|
D | transport.h | 538 asocket* create_device_tracker(TrackerOutputType type);
|
/packages/modules/adb/daemon/ |
D | jdwp_service.cpp | 386 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 …]
|
D | jdwp_service.h | 23 asocket* create_jdwp_service_socket(); 24 asocket* create_jdwp_tracker_service_socket(); 25 asocket* create_app_tracker_service_socket();
|
D | services.cpp | 167 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/ |
D | asocket.md | 3 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 …]
|
D | delayed_ack.md | 6 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
|
D | internals.md | 66 …asocket, 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.
|
D | README.md | 6 - [Understanding asocket](asocket.md)
|
D | root.md | 29 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`).
|