public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.connect(fd, address, port); } public FileDescriptor dup(FileDescriptor oldFd) throws ErrnoException { return os.dup(oldFd); }
@Override public void disconnect() { try { Libcore.os.connect(fd, InetAddress.UNSPECIFIED, 0); } catch (ErrnoException errnoException) { throw new AssertionError(errnoException); } catch (SocketException ignored) { // Thrown if the socket has already been closed, but this method can't throw anything. } connectedPort = -1; connectedAddress = null; isNativeConnected = false; }
@Override public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { BlockGuard.getThreadPolicy().onNetwork(); os.connect(fd, address, port); }
private static boolean connectErrno(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws ErrnoException, IOException { Libcore.os.connect(fd, inetAddress, port); return true; Libcore.os.connect(fd, inetAddress, port); IoUtils.setBlocking(fd, true); // 4. set the socket back to blocking. return true; // We connected immediately.
/** * @see java.nio.channels.DatagramChannel#disconnect() */ @Override synchronized public DatagramChannel disconnect() throws IOException { if (!isConnected() || !isOpen()) { return this; } connected = false; connectAddress = null; try { Libcore.os.connect(fd, InetAddress.UNSPECIFIED, 0); } catch (ErrnoException errnoException) { throw errnoException.rethrowAsIOException(); } if (socket != null) { socket.disconnect(); } return this; }
public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.connect(fd, address, port); } public FileDescriptor dup(FileDescriptor oldFd) throws ErrnoException { return os.dup(oldFd); }
public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.connect(fd, address, port); } public FileDescriptor dup(FileDescriptor oldFd) throws ErrnoException { return os.dup(oldFd); }
public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.connect(fd, address, port); } public FileDescriptor dup(FileDescriptor oldFd) throws ErrnoException { return os.dup(oldFd); }
@Override public void disconnect() { try { Libcore.os.connect(fd, InetAddress.UNSPECIFIED, 0); } catch (ErrnoException errnoException) { throw new AssertionError(errnoException); } catch (SocketException ignored) { // Thrown if the socket has already been closed, but this method can't throw anything. } connectedPort = -1; connectedAddress = null; isNativeConnected = false; }
@Override public void disconnect() { try { Libcore.os.connect(fd, InetAddress.UNSPECIFIED, 0); } catch (ErrnoException errnoException) { throw new AssertionError(errnoException); } catch (SocketException ignored) { // Thrown if the socket has already been closed, but this method can't throw anything. } connectedPort = -1; connectedAddress = null; isNativeConnected = false; }
@Override public void disconnect() { try { Libcore.os.connect(fd, InetAddress.UNSPECIFIED, 0); } catch (ErrnoException errnoException) { throw new AssertionError(errnoException); } catch (SocketException ignored) { // Thrown if the socket has already been closed, but this method can't throw anything. } connectedPort = -1; connectedAddress = null; isNativeConnected = false; }
@Override public void disconnect() { try { Libcore.os.connect(fd, InetAddress.UNSPECIFIED, 0); } catch (ErrnoException errnoException) { throw new AssertionError(errnoException); } catch (SocketException ignored) { // Thrown if the socket has already been closed, but this method can't throw anything. } connectedPort = -1; connectedAddress = null; isNativeConnected = false; }
@Override public void disconnect() { try { Libcore.os.connect(fd, InetAddress.UNSPECIFIED, 0); } catch (ErrnoException errnoException) { throw new AssertionError(errnoException); } catch (SocketException ignored) { // Thrown if the socket has already been closed, but this method can't throw anything. } connectedPort = -1; connectedAddress = null; isNativeConnected = false; }
@Override public void disconnect() { try { Libcore.os.connect(fd, InetAddress.UNSPECIFIED, 0); } catch (ErrnoException errnoException) { throw new AssertionError(errnoException); } catch (SocketException ignored) { // Thrown if the socket has already been closed, but this method can't throw anything. } connectedPort = -1; connectedAddress = null; isNativeConnected = false; }
@Override public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { BlockGuard.getThreadPolicy().onNetwork(); os.connect(fd, address, port); }
@Override public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { BlockGuard.getThreadPolicy().onNetwork(); os.connect(fd, address, port); }
@Override public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { BlockGuard.getThreadPolicy().onNetwork(); os.connect(fd, address, port); }
@Override public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { BlockGuard.getThreadPolicy().onNetwork(); os.connect(fd, address, port); }
@Override public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { BlockGuard.getThreadPolicy().onNetwork(); os.connect(fd, address, port); }
@Override public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { BlockGuard.getThreadPolicy().onNetwork(); os.connect(fd, address, port); }