You are reading lines but you aren't writing lines. readLine()
will block until it receives a line terminator, and you are never sending one. And as the data you are receiving is binary, you shouldn't be trying to read it with readLine()
anyway. Reconsider your data streams.