Enhanced socket to support nonblocking mode.

Any other files do not support nonblocking mode. Even supporting only
for socket is useful on android-nexec-client.