The official statement is that wifi shuts down under lock screen.
But according to at least one developer, the wifi shuts down only if you quit using it; while you are active on the network, under lock screen, wifi will stay up. Once you stop there appears to be some timeout then it shuts off.
Be advised that your app will need to pass Marketplace Certification requirements; see
this blog for more general tips and links.
-Mark