[Lldb-commits] [lldb] [lldb] Updated TCPSocket to listen multiple ports on the same single thread (PR #104797)
Dmitry Vasilyev via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 29 05:32:38 PDT 2024
slydiman wrote:
@labath
What exactly are you proposing?
We need some blocking method Accept() which can wait for connections from few ports. The current implementation of TCPSocket class already contains this functionality (a list of listening sockets).
It is possible to create a static method TCPSocket::Accept(MainLoop &loop, std::vector<NativeSocket> &listen_sockets) and a lot of helpers to initialise and store listen sockets using the same code from the existing TCPSocket::Listen(). It looks ugly. What is the profit from this work? It is necessary to spend months for this huge refactoring. Where will it be used except Acceptor.cpp? The class Acceptor is used only in lldb-server.
Then the best approach is to implement the full functional of Listen() and Accept() in the Acceptor.cpp using native sockets and without TCPSocket at all. It will contain 90% of the existing code from TCPSocket. Is it ok?
https://github.com/llvm/llvm-project/pull/104797
More information about the lldb-commits
mailing list