Marlene,
This really depends on the specific laptop. Some laptops are designed to run
at appropriate temperatures when closed, while others are designed to be
asleep when closed. If the machine goes into sleep mode, then there should be
no reason that damage would occur when the lid is down (regardless of the
network connection).
If you wanted to find out, you could simply try what you are asking us about,
and after 20-30 minutes, check the machine. Does it seem too warm? If it
does, then you shouldn't close the machine while running. If the machine
seems to not be too warm, and also seems to be doing a bit of work when you
open it for the first few seconds, then the machine probably went into sleep
or hibernate, and everything should be fine.
I hope this helps,
Leonard