difference between socket failing with EOF and connection reset

view story

http://stackoverflow.com – For testing a networking application, I have written an asio port "proxy": it listens on a socket for the application client activity and sends all incoming packets to another socket where it is listened to by the application server, and back. Now when either the application or the server disconnect for various reasons, the "proxy" usually gets an EOF but sometimes it receives a "connection reset". Hence, the question: when does a socket fail with a "connection reset" error? (HowTos)