This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This is probably not the best forum for a Java socket problem ;-)
... when doing socket stuff I now always find an appropriate framework and use that, rather than do the really low level stuff myself as there are far better experts at such things.
Why not search the net for an open source framework there are several what about ApacheMina (plenty of others), get it working in that if you can't use open source for whatever reason, their source code is freely available and usually well written to give you some tips as to where your going wrong.
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5