[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 18 02:01:49 PST 2024
================
@@ -250,6 +251,13 @@ def which(program):
return None
+def pickrandomport():
+ """Returns a random open port."""
+ with socket.socket() as sock:
+ sock.bind(("", 0))
+ return sock.getsockname()[1]
----------------
labath wrote:
Also, due to IPv4 vs IPv6 (at least), the port number alone does not uniquely identify an endpoint. I think we should be sending ip address + port pairs (lldb-server does not do that, but I think that was a mistake)
https://github.com/llvm/llvm-project/pull/116392
More information about the lldb-commits
mailing list