Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何使 python 服务器可以等待来自 2 个客户端的消息,而无需预先假设谁将首先发送消息。我可以做类似的事情-- message=client.recv(BUFSIZ) 或 targetsoc.recv(BUFSIZ) 我可以尝试这样的事情,其中 targetsoc 和 client 都是相互连接的客户端套接字,我不知道谁会先发送消息?
我基本上希望能够在没有任何顺序或优先级的情况下同时监听来自两个客户端的数据......