Home | History | Annotate | Download | only in adb

Lines Matching refs:port

51 // Android Wear has been using port 5601 in all of its documentation/tooling,
53 // Avoid stomping on their port by limiting the number of emulators that can be
59 // We keep a map from emulator port to transport.
65 bool local_connect(int port) {
67 return local_connect_arbitrary_ports(port - 1, port, &dummy) == 0;
78 int port = DEFAULT_ADB_LOCAL_TRANSPORT_PORT;
79 if (!android::base::ParseNetAddress(address, &host, &port, &serial, response)) {
84 int fd = network_connect(host.c_str(), port, SOCK_STREAM, 10, &error);
100 int ret = register_socket_transport(fd, serial.c_str(), port, 0);
144 int port = DEFAULT_ADB_LOCAL_TRANSPORT_PORT;
148 for ( ; count > 0; count--, port += 2 ) {
149 local_connect(port);
153 // Retry the disconnected local port for 60 times, and sleep 1 second between two retries.
158 int port;
188 for (auto& port : ports) {
189 VLOG(TRANSPORT) << "retry port " << port.port << ", last retry_count "
190 << port.retry_count;
191 if (local_connect(port.port)) {
192 VLOG(TRANSPORT) << "retry port " << port.port << " successfully";
195 if (--port.retry_count > 0) {
196 next_ports.push_back(port);
198 VLOG(TRANSPORT) << "stop retrying port " << port.port;
212 static void server_socket_thread(int port) {
221 serverfd = network_inaddr_any_server(port, SOCK_STREAM, &error);
230 D("server: trying to get new connection from %d", port);
237 if (register_socket_transport(fd, serial.c_str(), port, 1) != 0) {
292 static void qemu_socket_thread(int port) {
308 snprintf(con_name, sizeof(con_name), "pipe:qemud:adb:%d", port);
316 std::thread(server_socket_thread, port).detach();
336 if (register_socket_transport(fd, serial.c_str(), port, 1) != 0 ||
377 void local_init(int port)
393 std::thread(func, port).detach();
404 RetryPort port;
405 port.port = local_port_;
406 port.retry_count = LOCAL_PORT_RETRY_COUNT;
407 retry_ports.push_back(port);
458 D("local transport for port %d already registered (%p)?", adb_port, existing_transport);