You are not logged in.
I have a serious problem while connecting a client to server(itterative loopback).
For the first time the client will connect without delay. But next time onwards there is a consistent delay of 3 secs while connecting.
When i analyze the packet sequence using a packet analyzer ,
-->I could see that the client will send "FIN,ACK" once it receives the data from the server.
-->Before the server sends back the "FIN,ACK" , the client will request for another
connection by sending "SYN".
-->Since the server has not send the "FIN, ACK" back it will send a "RST" to the client.
--> the client will try again by sending the "SYN' .
I want to know is it the problem with client or the server?
Can anyone help me?..
Thanks in advance
It sounds to me like maybe your client is trying to reuse port#'s...
If so, don't do that... ;-) Client's should rarely ever use any specific
port#, but should always just let the system assign them a new unused
ephemeral one... If for some strange reason, your client NEEDS to
reuse the same specific port#, well then you've got problems... I
think in THAT case, you might need to screw around with SO_LINGER,
and try to tear your connections down with RST, rather than FIN...
But, in general, that's a very BAD and dangerous idea, so I don't
recommend it at all... Instead, I'd recommend changing your design
so your clients need not be on some specific fixed port#...
If you don't think you're reusing client port#'s, then post some code
from the client (all socket-related calls, at least)...