Sockets pipeToFile send receive at most once per sec

I also find that the the `secure` tests failed on Android 5 (Nexus 5), but it works fine on Android 4.4.4 (Nexus 7).