commit | 49e79cdc1aadb2922178e8905a7907df0bdaf7b3 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Thu Mar 11 18:10:42 2010 -0800 |
committer | Elliott Hughes <enh@google.com> | Thu Mar 11 18:10:42 2010 -0800 |
tree | fd7582323d3a6915331dfdf3a7aa9bf51f81e753 | |
parent | a0a4196cb15480959f053d0ebe6b412bd23c8170 [diff] |
Use ioctl(FIONREAD) rather than recv(MSG_PEEK) to implement Socket.available. As well as avoiding unnecessary work, this also means we can reuse the native code we already have for ioctl(FIONREAD), though we need to change the interface to take FileDescriptor rather than int, and extract the int on the native side. Change-Id: I4c6d9e4e72e514e3e7872c7f882bda5441059915