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.
我有一个 C/S 模型,每个客户端使用 3 个或更多 TCP 连接到一台服务器,例如一个用于二进制数据的连接,一个用于文本消息,一个用于控制。
但是,我不知道如何将这 3 个连接“分组”为一个客户端。
我尝试过使用相同的 IP,但不同的客户端可能具有相同的 IP 地址。
虽然我使用的是 node.js,但我认为这是一个常见问题,可能出现在任何语言/实现中。
The only thing you can do is handle it at an application layer. Send some data that the clients have to return to you in some form for each connection. (Look at the SSL handshaking process. Maybe just use that!)