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
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
Only part of the code is pasted, so there is no way to run the test. In addition, your description of the problem scenario is too general. Please organize your language to describe it clearly.
Just looking at this part of the code, I don’t know what you are using for communication.. I assume it is tcp socket
These APIs, including tcp socket, are all byte stream oriented, and there is no guarantee that one write corresponds to one read.
If you want one write and one read, that is, "message" oriented, you need to implement it yourself in the upper layer.
Only part of the code is pasted, so there is no way to run the test. In addition, your description of the problem scenario is too general. Please organize your language to describe it clearly.
Just looking at this part of the code, I don’t know what you are using for communication.. I assume it is tcp socket
These APIs, including tcp socket, are all byte stream oriented, and there is no guarantee that one write corresponds to one read.
If you want one write and one read, that is, "message" oriented, you need to implement it yourself in the upper layer.