Let me try to clarify my question, I wasn't sure how to word the title. This is purely out of my curiosity.
Between the raw bytes coming over your internet connection and your browser, there are many layers. Each layer adds more structure to the data, eventually ending up as HTML markup. I'm going with the assumption that the final length of the HTML data is unknown and bytes are being streamed in until the document is complete. Please correct me if this assumption is wrong.
You've grown impatient and you click "Stop" in your browser. What happens within those layers? Is the socket closed on the client side and an exception condition allowed to rise through the layers? In at least one point in this chain, there must be a blocking operation that's waiting for the layer below it and that's no longer blocking, so how does that happen?
I apologize if this is not clear. I'm having trouble putting across the picture that's in my mind.