> DataOutputStream out = new
DataOutputStream(connection.getOutputStream());
> System.out.println("***");
> out.write(str.getBytes(), 0, str.length());
> out.flush();
> out.close();
  ^^^^^^^^^^^

Not sure if I read your e-mail correctly, but 'out.close()' will close
the socket's OutputStream which closes the socket.

Michael

Reply via email to