(host, port)
| 14 | |
| 15 | |
| 16 | def connect(host, port): |
| 17 | from debugpy.common import log, messaging, sockets |
| 18 | from debugpy.launcher import handlers |
| 19 | |
| 20 | global channel, adapter_host |
| 21 | assert channel is None |
| 22 | assert adapter_host is None |
| 23 | |
| 24 | log.info("Connecting to adapter at {0}:{1}", host, port) |
| 25 | |
| 26 | ipv6 = host.count(":") > 1 |
| 27 | sock = sockets.create_client(ipv6) |
| 28 | sock.connect((host, port)) |
| 29 | adapter_host = host |
| 30 | |
| 31 | stream = messaging.JsonIOStream.from_socket(sock, "Adapter") |
| 32 | channel = messaging.JsonMessageChannel(stream, handlers=handlers) |
| 33 | channel.start() |
nothing calls this directly
no test coverage detected
searching dependent graphs…