Fixing stupid sockets.h design

Still need to return a proper code if we returned due to non-blocking
rather then returned due to an error in read and accept.