Tabnine Logo
IoBridge.closeSocket
Code IndexAdd Tabnine to your IDE (free)

How to use
closeSocket
method
in
libcore.io.IoBridge

Best Java code snippets using libcore.io.IoBridge.closeSocket (Showing top 20 results out of 315)

origin: robovm/robovm

/**
 * Closes the socket.  After this method is invoked, subsequent
 * read/write operations will fail.
 */
public void close() throws IOException {
  guard.close();
  IoBridge.closeSocket(fd);
}
origin: robovm/robovm

@Override protected synchronized void implCloseSelectableChannel() throws IOException {
  connected = false;
  if (socket != null && !socket.isClosed()) {
    socket.close();
  } else {
    IoBridge.closeSocket(fd);
  }
}
origin: robovm/robovm

@Override
public synchronized void close() {
  guard.close();
  try {
    IoBridge.closeSocket(fd);
  } catch (IOException ignored) {
  }
}
origin: robovm/robovm

@Override
protected synchronized void close() throws IOException {
  guard.close();
  IoBridge.closeSocket(fd);
}
origin: robovm/robovm

@Override
protected synchronized void implCloseSelectableChannel() throws IOException {
  if (status != SOCKET_STATUS_CLOSED) {
    status = SOCKET_STATUS_CLOSED;
    if (socket != null && !socket.isClosed()) {
      socket.close();
    } else {
      IoBridge.closeSocket(fd);
    }
  }
}
origin: robovm/robovm

private boolean isReachable(InetAddress destination, InetAddress source, int timeout) throws IOException {
  // TODO: try ICMP first (http://code.google.com/p/android/issues/detail?id=20106)
  FileDescriptor fd = IoBridge.socket(true);
  boolean reached = false;
  try {
    if (source != null) {
      IoBridge.bind(fd, source, 0);
    }
    IoBridge.connect(fd, destination, 7, timeout);
    reached = true;
  } catch (IOException e) {
    if (e.getCause() instanceof ErrnoException) {
      // "Connection refused" means the IP address was reachable.
      reached = (((ErrnoException) e.getCause()).errno == ECONNREFUSED);
    }
  }
  IoBridge.closeSocket(fd);
  return reached;
}
origin: MobiVM/robovm

@Override
public synchronized void close() {
  guard.close();
  try {
    IoBridge.closeSocket(fd);
  } catch (IOException ignored) {
  }
}
origin: MobiVM/robovm

/**
 * Closes the socket.  After this method is invoked, subsequent
 * read/write operations will fail.
 */
public void close() throws IOException {
  guard.close();
  IoBridge.closeSocket(fd);
}
origin: MobiVM/robovm

@Override protected synchronized void implCloseSelectableChannel() throws IOException {
  connected = false;
  if (socket != null && !socket.isClosed()) {
    socket.close();
  } else {
    IoBridge.closeSocket(fd);
  }
}
origin: ibinti/bugvm

@Override
public synchronized void close() {
  guard.close();
  try {
    IoBridge.closeSocket(fd);
  } catch (IOException ignored) {
  }
}
origin: ibinti/bugvm

/**
 * Closes the socket.  After this method is invoked, subsequent
 * read/write operations will fail.
 */
public void close() throws IOException {
  guard.close();
  IoBridge.closeSocket(fd);
}
origin: MobiVM/robovm

@Override
protected synchronized void close() throws IOException {
  guard.close();
  IoBridge.closeSocket(fd);
}
origin: com.mobidevelop.robovm/robovm-rt

@Override
public synchronized void close() {
  guard.close();
  try {
    IoBridge.closeSocket(fd);
  } catch (IOException ignored) {
  }
}
origin: com.mobidevelop.robovm/robovm-rt

@Override
protected synchronized void close() throws IOException {
  guard.close();
  IoBridge.closeSocket(fd);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Closes the socket.  After this method is invoked, subsequent
 * read/write operations will fail.
 */
public void close() throws IOException {
  guard.close();
  IoBridge.closeSocket(fd);
}
origin: com.gluonhq/robovm-rt

@Override
public synchronized void close() {
  guard.close();
  try {
    IoBridge.closeSocket(fd);
  } catch (IOException ignored) {
  }
}
origin: MobiVM/robovm

@Override
protected synchronized void implCloseSelectableChannel() throws IOException {
  if (status != SOCKET_STATUS_CLOSED) {
    status = SOCKET_STATUS_CLOSED;
    if (socket != null && !socket.isClosed()) {
      socket.close();
    } else {
      IoBridge.closeSocket(fd);
    }
  }
}
origin: ibinti/bugvm

@Override
protected synchronized void implCloseSelectableChannel() throws IOException {
  if (status != SOCKET_STATUS_CLOSED) {
    status = SOCKET_STATUS_CLOSED;
    if (socket != null && !socket.isClosed()) {
      socket.close();
    } else {
      IoBridge.closeSocket(fd);
    }
  }
}
origin: com.mobidevelop.robovm/robovm-rt

@Override
protected synchronized void implCloseSelectableChannel() throws IOException {
  if (status != SOCKET_STATUS_CLOSED) {
    status = SOCKET_STATUS_CLOSED;
    if (socket != null && !socket.isClosed()) {
      socket.close();
    } else {
      IoBridge.closeSocket(fd);
    }
  }
}
origin: com.bugvm/bugvm-rt

@Override
protected synchronized void implCloseSelectableChannel() throws IOException {
  if (status != SOCKET_STATUS_CLOSED) {
    status = SOCKET_STATUS_CLOSED;
    if (socket != null && !socket.isClosed()) {
      socket.close();
    } else {
      IoBridge.closeSocket(fd);
    }
  }
}
libcore.ioIoBridgecloseSocket

Popular methods of IoBridge

  • available
  • bind
  • booleanFromInt
  • booleanToInt
  • connect
    Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. Use timeoutMs == 0 fo
  • connectDetail
  • connectErrno
  • getSocketLocalAddress
  • getSocketLocalPort
  • getSocketOption
    java.net has its own socket options similar to the underlying Unix ones. We paper over the differenc
  • getSocketOptionErrno
  • isConnected
  • getSocketOptionErrno,
  • isConnected,
  • maybeThrowAfterRecvfrom,
  • maybeThrowAfterSendto,
  • open,
  • postRecvfrom,
  • read,
  • recvfrom,
  • sendto

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JButton (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now