I'd like to make a TCP client that makes multiple connections while a select() loop that receives data from them is running *in a separate thread*. I'm not sure this is possible, though, because the select() loop is already running and thus I don't see how it would "notice" a new socket was added even if the thread-safety issues are dealt with.
Is there a way to do this, or must I spawn a new thread and use recv() every time I make a new connection?
(Edited for clarity.)
以上就是Can select() be used for clients, not just servers?的详细内容，更多请关注web前端其它相关文章！