我的socket是Clinet端,利用TCP给服务器发送命令,服务器给我发送结果.
我认为按照TCP协议,尽管我可能发送的命令很快,但是TCP会按照我的发送顺序给我返回数据.
但是
pcto1230.command=Req_Machine_Parameter;
out_client.write(dealsend(pcto1230));
in_client.read(getinfo);
tt1230topc=dealreceive(getinfo); 
//analyse
..
pcto1230.command=Req_System_Parameter;
out_client.write(dealsend(pcto1230));
in_client.read(getinfo);
 tt1230topc=dealreceive(getinfo);
..
有时候出现单步调试始终停留在第二个in_client.read()不能往下走
有时候出现第二个read的数据却是别的命令中返回的数据.而用sniff抓到数据包表明,TCP是按照命令的先后顺序返回数据,可是为什么自己或取得却是别的数据呢?
请问:JRE问题?还是我程序问题?服务器返回绝对没问题
求求各位!谢谢!