Updated TcpSender.java.
Make TcpSender class close Sockets after sending messages and reopen Sockets before sending message. Also updates TcpSenderTest accordingly.
Updated TcpReceiverTest.java.
Try to resolve the timeout failure by removing setDaemon(true) method.