You can detect it, but your handler code will likely only happen after wake.
You might have enough time to run 1 or 2 lines of code, but that's a might.
The amount will vary from run to run, so it's not reliable.
So this is a similar situation to what occurs if the device powers
itself down.
The application scenario I am trying to exist with is that my
application has a socket connection to another system. After powerdown
that connection is seemingly unusable (there is a socket exception about
trying to use something to that is not a socket). So I would assume
that if I did a socket.close on that same connection I would fail as
well.
Meanwhile, the server application seems to think that the connection
still exists so I need to be able to reinstate the PPC side's socket
comms or clean up on the server side.
I deal with the PPC turning itself off by using a timer that I reset
whenever there is activity and if there is no activity I do a socket
close and reconnect when there is a requirement for more activity. This
needs to be improved some as I need to determine that there is in fact a
wireless connection before doing the reconnect but that is another
problem.
Is the situation where my socket becomes unusable after a
powerdown/powerup the normal situation or am I missing something?
As a supplementary question related to powerdown. If I run my
application simulating the network traffic via a timer (for load
testing) it seems that the powerdown due to the device not being used
occurs. What defines 'not being used'?
thanks