 <p>You receive null at the end of the stream. The client correctly starts, sends Ready, and the the ends, so the stream ends.</p> <p>Totally correct behaviour. If the client would end itself (but instead do something else like reading server messages on stdin), the server would never receive a null.</p> <p>Edit: NEVER EVER (!!!!!) do this:</p> <pre><code>catch(IOException e){} </code></pre> <p>At least write:</p> <pre><code>catch(IOException e){ e.printStackTrace() } </code></pre> <p>This will show you your error!</p> <p>In my company, this is one of the elementary rules of code style!</p>