I have two sockets connected, and the first socket has just sent the second socket 20 MB of data. Now the user has decided that he wants to close the connection, so the first socket sends a FIN to the second socket.
Now the problem is that the FIN will only be processed by the second socket once the 2 MB of data has be fully received (which could take no less than 10 minutes!).
So how can I close the connection immediately, should I send an RST instead of a FIN? and is there any issues in sending an RST (other than the fact that the 2 MB of data will be discarded)?