Your headers are not HTTP compliant.
java's println(String) functions just append a newline character '\n' to the string. The correct way to terminate a HTTP header line is appending a carriage return and than a newline to the line: '\r\n'.
The while loop is not going to work properly either. The correct while loop should be:
while (!response.equals("")) {
if (response == null) {
throw new IOException("reading null indicates an error");
}
...
}
Java's readLine functions block until they read a non-null string. If readLine() cannot read a string it throws an IOException (either because the connection failed or because you specified a read timeout by setting Socket.soTimeout(int != 0).
I don't know the gnucleus sources but that was not the problem keeping you from connecting. The code opening the socket appears to be correct so Gnucleus should at least notice the connection attempt.
If you have any further questions feel free to mail me ( gregorio at gmx.li ) or subscribe to the limewire devel mailinglists at
www.limewire.org (
dev@core.limewire.org is the place to go for questions like this).