Last few chars in a string sent over socket sometimes missing in Java network program

后端 未结 3 664
野趣味
野趣味 2021-01-24 14:36

Right now, I\'m trying to write a GUI based Java tic-tac-toe game that functions over a network connection. It essentially works at this point, however I have an intermittent er

3条回答
  •  甜味超标
    2021-01-24 15:35

    Try flushing the OutputStream on the sender side. The last bytes might remain in some intenal buffers.

提交回复
热议问题