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

前端 未结 5 1857
逝去的感伤
逝去的感伤 2021-01-04 14:05

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:55

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

提交回复
热议问题