c++ - Are there any good ideas for multi-threaded socket sending and receiving?
大家讲道理
大家讲道理 2017-07-06 10:34:26
0
2
1616

A is the client’s socket
B is the server’s socket
A connect B TCP connection

Equal to A B establishing a tunnel

Various local requests are made to A, relayed to B for post-processing, and a bunch of data is returned

Then the question comes,
Is there any good solution to distinguish this pile of data and reply to the initiator?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
扔个三星炸死你

zeromq

我想大声告诉你

Use higher-level protocols, such as HTTP.
Otherwise, encapsulate additional information (ID, type, ...) in request and response?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template