Java client and a C++ server send and receive via TCP Socket

后端 未结 3 519
渐次进展
渐次进展 2021-01-05 17:09

I have a C++ server and two clients (ruby and java). Everything is running on a 64-bit linux-machine (java 1.7.0_17) The ruby client is fully working, but the java version m

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-05 17:25

    while ((recv_count = recv(SocketFD, buffer, sizeof(buffer) - 1, 0)) > 0) {
          if (recv_count == -1) {
    

    I don't know what your problem is but this code is certainly nonsense. It is impossible for the inner test ever to succeed.

提交回复
热议问题