84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
客户端和服务器端的交互已经定型,采用了如下的方式:
1、客户端向服务器端发送请求,获取到接下来需要读取数据的长度;
2、客户端从服务器端读取第一步获取到长度的数据。
按照以上的逻辑,目前写出的代码可读性不高,看着有些怪异。由于这种通信的方式已经不能改变,是否有合理的架构可以满足以上的交互?
学习是最好的投资!
asio + coroutine
Reference: http://think-async.com/Asio/a...
Write a bottom layer yourself to encapsulate the protocol, read the content data, and then push or call back to the upper layer.
asio + coroutine
Reference: http://think-async.com/Asio/a...
Write a bottom layer yourself to encapsulate the protocol, read the content data, and then push or call back to the upper layer.