How do SCP/SSH keep connections alive?

I'm currently downloading a humongous file from a server thousands of miles away. Expected time was about 4 hours with my DSL connection. All of a sudden my wireless connection was dropped. I had no idea why and I was only able to bring it up again by unplugging and plugging in my wireless router. All in all this took at least 4-5 minutes since it took me a while to realize something was wrong, track it down to the hub, and then reboot it. After doing this I checked on my scp copy. Up until rebooting it was hanging there with a message that said "- stalled -". After rebooting the hub a few seconds later the wireless connection came back up and scp continued without any user intervention.

I was quite surprised by this. I would have expected that with the hub down the connection would be lost and could not be reconnected without at least asking for my password. Can anyone shed any light on this?