From the ethreal packet capture, I see the following behaviour which appears quite strange to me:
Client --> Server [SYN]
Server --> Client [SYN, ACK]
Client --> Server [ACK]
Server --> Client [FIN, ACK]
Client --> Server [ACK]
Client --> Server [TCP Segment of a reassembled PDU] (I don't know what this means)
Server --> Client [RST]
Any ideas as to why this could be happening?
Also, the Server Port is 6000. Could that cause any problem?
My other doubts:
EDIT: After some more analysis, I found if the number of file descriptors have exceeded the limit then a FIN is sent by the Server. But, in this case it doesn't appear that the file descriptors have exceeded the limit. For what other scenarios can this happen?
FIN usually means the other side called shutdown(..)
on the socket.