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

前端 未结 5 996
情歌与酒
情歌与酒 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:49

    Your "sender" is waiting to receive data back from the "receiver", and this is where the code waits indefinitely. Is the receiver supposed to be sending a response when it gets a message?

提交回复
热议问题