Java - Reading from a buffered reader (from a socket) is pausing the thread

前端 未结 5 1019
情歌与酒
情歌与酒 2021-01-04 14:31

I have a thread that reads characters from a Buffered reader (created from a socket as follows):

inputStream = new BufferedReader(new InputStreamReader(clien         


        
5条回答
  •  独厮守ぢ
    2021-01-04 14:57

    Implement a protocol where you send the length of your data in your headers so the server/client knows how much data to expect.

提交回复
热议问题