[Lldb-commits] [lldb] [lldb][NFC] Move few static helpers to the class Socket and make them public (PR #106640)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 2 06:28:36 PDT 2024


slydiman wrote:

It is necesary for Acceptor in #104238.
90% of this Acceptor contains the code from TCPSocket and TCPSocket has only cosmetics changes.

m_listen_sockets used in Accept() must be initialized and stored somewhere.
I think the best place for m_listen_sockets is TCPSocket and I proposed #104797 (note it is better to use `Status TCPSocket::Listen(llvm::StringRef name, int backlog, std::set<uint16_t> * extra_ports = nullptr)` instead to keep the connection string unchanged).

> noone should be making raw socket calls.

Ok, but m_listen_sockets contains native socket. So everything must be inside TCPSocket w/o any callbacks.
Then let's complete #104797.

Or how else do you propose to initialize m_listen_sockets to accept connections from 2 ports?

https://github.com/llvm/llvm-project/pull/106640


More information about the lldb-commits mailing list