summaryrefslogtreecommitdiffstats
path: root/dalvik/src
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-05-09 18:26:23 -0700
committerElliott Hughes <enh@google.com>2011-05-09 19:17:28 -0700
commit996bf79565ac88402920bd826d6f85952c83be20 (patch)
tree573e91ed92a330f0f48974df26865f1731a7be04 /dalvik/src
parent5fc573b5456b149269d37262ff831ea54eb815da (diff)
downloadlibcore-996bf79565ac88402920bd826d6f85952c83be20.zip
libcore-996bf79565ac88402920bd826d6f85952c83be20.tar.gz
libcore-996bf79565ac88402920bd826d6f85952c83be20.tar.bz2
Expose connect(2).
The new NET_FAILURE_RETRY in Posix.cpp is intended to replace the legacy one in NetFd.h, but during the transition we need both. The new one also takes care of the asynchronous Socket.close semantics, and changes the behavior when the FileDescriptor is invalid on entry: that is now reported as EBADF; it's only reported as "Socket closed" when we've been round the loop at least once, giving us reason to believe the socket was ever open. Having had to debug this distinction, I think the new semantics are less confusing. Bug: 3107501 Change-Id: I243dc4fa2eddde7ba40e9b66ec8fc555bc4e80f9
Diffstat (limited to 'dalvik/src')
-rw-r--r--dalvik/src/main/java/dalvik/system/BlockGuard.java5
1 files changed, 0 insertions, 5 deletions
diff --git a/dalvik/src/main/java/dalvik/system/BlockGuard.java b/dalvik/src/main/java/dalvik/system/BlockGuard.java
index 119833b..fd4be27 100644
--- a/dalvik/src/main/java/dalvik/system/BlockGuard.java
+++ b/dalvik/src/main/java/dalvik/system/BlockGuard.java
@@ -195,11 +195,6 @@ public final class BlockGuard {
return mNetwork.writeDirect(fd, address, offset, count);
}
- public boolean connect(FileDescriptor fd, InetAddress inetAddress, int port) throws IOException {
- BlockGuard.getThreadPolicy().onNetwork();
- return mNetwork.connect(fd, inetAddress, port);
- }
-
public boolean isConnected(FileDescriptor fd, int timeout) throws IOException {
if (timeout != 0) {
// Greater than 0 is a timeout, but zero means "poll and return immediately".