Java — How to read an unknown number of bytes from an inputStream (socket/socketServer)?

后端 未结 11 1007
梦如初夏
梦如初夏 2020-12-15 07:42

Looking to read in some bytes over a socket using an inputStream. The bytes sent by the server may be of variable quantity, and the client doesn\'t know in advance the lengt

11条回答
  •  伪装坚强ぢ
    2020-12-15 08:19

    This is both a late answer and self-advertising, but anyone checking out this question may want to take a look here: https://github.com/GregoryConrad/SmartSocket

提交回复
热议问题