Blocking on a Socket read operation while in sleep mode

by Omer Gilad » Tue, 29 Dec 2009 06:11:02 GMT

Sponsored Links
 I have code that runs in the background and holds a connected Socket
and it's InputStream.
It calls read() infinitely until something is received, then continues
to parse. Socket timeout is 0 of course.

I am interested in what would happen when the device goes to sleep? Is
the CPU off? Will this socket be responsive in this case (Say, my
server sends some notification)?



Blocking on a Socket read operation while in sleep mode

by Raj » Wed, 20 Jan 2010 02:06:36 GMT

 Yes, the CPU is OFF when the device goes to sleep. The socket is non-
responsive at this time.
Hope that helpps.

> Thanks

Sponsored Links

Other Threads

1. Set Image in background

I am developping a live Wallpaper on android 2.1

I want to set in background a bitmap that i download on a server. I
use canvas with the method setBitmap(Bitmap bitmap); but it don't
work. I also try to set it in an ImageView in a different class of my
live Wallpaper but it also don't work.

Have you got a solution ?

Thanks in advance


2. HTC Incredible no default external storage?

That's the app-local file storage area. And if the answer is that the
Incredible has a few GB of space set aside for this, that's excellent.

If, however, the Incredible has your typical 512MB-or-lower space set
aside for apps, we need to figure out if there's a way to get to the
rest of the on-board flash.

My hope is that Environment.getExternalStorageDirectory() works, but
that HTC elected to rename it from /sdcard, and that apps hardwiring
/sdcard are the ones that are failing.

I am attempting to get some answers on this. If there's anyone out there
with a pre-release Incredible, I'd like to work with you on some tests
-- feel free to contact me off-list if desired.

Mark Murphy (a Commons Guy) |

Android App Developer Books:


3. String resources do not update when orientation changes

4. Cyanogen 5.0.7 eclair untuk dream dan magic..

5. AV sync mismatch after seek in Real media files.

6. cacerts.bks availability on device

7. Android Developer Device Seeding Program - Updates?