title: java/groovy socket write timeout
body: <p>I have a simple badly behaved server (written in Groovy) </p>
  
  <pre><code>ServerSocket ss = new ServerSocket(8889);
  Socket s = ss.accept()
  Thread.sleep(1000000)
  </code></pre>
  
  <p>And a client who I want to have timeout (since the server is not consuming it's input)</p>
  
  <pre><code>Socket s = new Socket("192.168.0.106", 8889)
  s.setSoTimeout(100);
  s.getOutputStream.write( new byte[1000000] );
  </code></pre>
  
  <p>However, this client blocks forever.  How do I get the client to timeout?  </p>
  
  <p>THANKS!!</p>