Tabnine Logo
Os.socket
Code IndexAdd Tabnine to your IDE (free)

How to use
socket
method
in
libcore.io.Os

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

origin: robovm/robovm

public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException { return os.socket(domain, type, protocol); }
public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { os.socketpair(domain, type, protocol, fd1, fd2); }
origin: robovm/robovm

@Override public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException {
  return tagSocket(os.socket(domain, type, protocol));
}
origin: robovm/robovm

public static FileDescriptor socket(boolean stream) throws SocketException {
  FileDescriptor fd;
  try {
    fd = Libcore.os.socket(AF_INET6, stream ? SOCK_STREAM : SOCK_DGRAM, 0);
    // The RFC (http://www.ietf.org/rfc/rfc3493.txt) says that IPV6_MULTICAST_HOPS defaults
    // to 1. The Linux kernel (at least up to 2.6.38) accidentally defaults to 64 (which
    // would be correct for the *unicast* hop limit).
    // See http://www.spinics.net/lists/netdev/msg129022.html, though no patch appears to
    // have been applied as a result of that discussion. If that bug is ever fixed, we can
    // remove this code. Until then, we manually set the hop limit on IPv6 datagram sockets.
    // (IPv4 is already correct.)
    if (!stream) {
      Libcore.os.setsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, 1);
    }
    return fd;
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsSocketException();
  }
}
origin: MobiVM/robovm

public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException { return os.socket(domain, type, protocol); }
public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { os.socketpair(domain, type, protocol, fd1, fd2); }
origin: ibinti/bugvm

public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException { return os.socket(domain, type, protocol); }
public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { os.socketpair(domain, type, protocol, fd1, fd2); }
origin: com.gluonhq/robovm-rt

public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException { return os.socket(domain, type, protocol); }
public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { os.socketpair(domain, type, protocol, fd1, fd2); }
origin: com.mobidevelop.robovm/robovm-rt

public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException { return os.socket(domain, type, protocol); }
public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { os.socketpair(domain, type, protocol, fd1, fd2); }
origin: com.bugvm/bugvm-rt

public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException { return os.socket(domain, type, protocol); }
public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { os.socketpair(domain, type, protocol, fd1, fd2); }
origin: FlexoVM/flexovm

public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException { return os.socket(domain, type, protocol); }
public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { os.socketpair(domain, type, protocol, fd1, fd2); }
origin: ibinti/bugvm

@Override public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException {
  return tagSocket(os.socket(domain, type, protocol));
}
origin: com.mobidevelop.robovm/robovm-rt

@Override public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException {
  return tagSocket(os.socket(domain, type, protocol));
}
origin: MobiVM/robovm

@Override public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException {
  return tagSocket(os.socket(domain, type, protocol));
}
origin: com.bugvm/bugvm-rt

@Override public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException {
  return tagSocket(os.socket(domain, type, protocol));
}
origin: FlexoVM/flexovm

@Override public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException {
  return tagSocket(os.socket(domain, type, protocol));
}
origin: com.gluonhq/robovm-rt

@Override public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException {
  return tagSocket(os.socket(domain, type, protocol));
}
origin: MobiVM/robovm

public static FileDescriptor socket(boolean stream) throws SocketException {
  FileDescriptor fd;
  try {
    fd = Libcore.os.socket(AF_INET6, stream ? SOCK_STREAM : SOCK_DGRAM, 0);
    // The RFC (http://www.ietf.org/rfc/rfc3493.txt) says that IPV6_MULTICAST_HOPS defaults
    // to 1. The Linux kernel (at least up to 2.6.38) accidentally defaults to 64 (which
    // would be correct for the *unicast* hop limit).
    // See http://www.spinics.net/lists/netdev/msg129022.html, though no patch appears to
    // have been applied as a result of that discussion. If that bug is ever fixed, we can
    // remove this code. Until then, we manually set the hop limit on IPv6 datagram sockets.
    // (IPv4 is already correct.)
    if (!stream) {
      Libcore.os.setsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, 1);
    }
    return fd;
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsSocketException();
  }
}
origin: com.mobidevelop.robovm/robovm-rt

public static FileDescriptor socket(boolean stream) throws SocketException {
  FileDescriptor fd;
  try {
    fd = Libcore.os.socket(AF_INET6, stream ? SOCK_STREAM : SOCK_DGRAM, 0);
    // The RFC (http://www.ietf.org/rfc/rfc3493.txt) says that IPV6_MULTICAST_HOPS defaults
    // to 1. The Linux kernel (at least up to 2.6.38) accidentally defaults to 64 (which
    // would be correct for the *unicast* hop limit).
    // See http://www.spinics.net/lists/netdev/msg129022.html, though no patch appears to
    // have been applied as a result of that discussion. If that bug is ever fixed, we can
    // remove this code. Until then, we manually set the hop limit on IPv6 datagram sockets.
    // (IPv4 is already correct.)
    if (!stream) {
      Libcore.os.setsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, 1);
    }
    return fd;
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsSocketException();
  }
}
origin: com.bugvm/bugvm-rt

public static FileDescriptor socket(boolean stream) throws SocketException {
  FileDescriptor fd;
  try {
    fd = Libcore.os.socket(AF_INET6, stream ? SOCK_STREAM : SOCK_DGRAM, 0);
    // The RFC (http://www.ietf.org/rfc/rfc3493.txt) says that IPV6_MULTICAST_HOPS defaults
    // to 1. The Linux kernel (at least up to 2.6.38) accidentally defaults to 64 (which
    // would be correct for the *unicast* hop limit).
    // See http://www.spinics.net/lists/netdev/msg129022.html, though no patch appears to
    // have been applied as a result of that discussion. If that bug is ever fixed, we can
    // remove this code. Until then, we manually set the hop limit on IPv6 datagram sockets.
    // (IPv4 is already correct.)
    if (!stream) {
      Libcore.os.setsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, 1);
    }
    return fd;
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsSocketException();
  }
}
origin: com.gluonhq/robovm-rt

public static FileDescriptor socket(boolean stream) throws SocketException {
  FileDescriptor fd;
  try {
    fd = Libcore.os.socket(AF_INET6, stream ? SOCK_STREAM : SOCK_DGRAM, 0);
    // The RFC (http://www.ietf.org/rfc/rfc3493.txt) says that IPV6_MULTICAST_HOPS defaults
    // to 1. The Linux kernel (at least up to 2.6.38) accidentally defaults to 64 (which
    // would be correct for the *unicast* hop limit).
    // See http://www.spinics.net/lists/netdev/msg129022.html, though no patch appears to
    // have been applied as a result of that discussion. If that bug is ever fixed, we can
    // remove this code. Until then, we manually set the hop limit on IPv6 datagram sockets.
    // (IPv4 is already correct.)
    if (!stream) {
      Libcore.os.setsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, 1);
    }
    return fd;
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsSocketException();
  }
}
origin: ibinti/bugvm

public static FileDescriptor socket(boolean stream) throws SocketException {
  FileDescriptor fd;
  try {
    fd = Libcore.os.socket(AF_INET6, stream ? SOCK_STREAM : SOCK_DGRAM, 0);
    // The RFC (http://www.ietf.org/rfc/rfc3493.txt) says that IPV6_MULTICAST_HOPS defaults
    // to 1. The Linux kernel (at least up to 2.6.38) accidentally defaults to 64 (which
    // would be correct for the *unicast* hop limit).
    // See http://www.spinics.net/lists/netdev/msg129022.html, though no patch appears to
    // have been applied as a result of that discussion. If that bug is ever fixed, we can
    // remove this code. Until then, we manually set the hop limit on IPv6 datagram sockets.
    // (IPv4 is already correct.)
    if (!stream) {
      Libcore.os.setsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, 1);
    }
    return fd;
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsSocketException();
  }
}
libcore.ioOssocket

Popular methods of Os

  • accept
  • access
  • bind
  • chmod
  • chown
  • close
  • connect
  • dup
  • dup2
  • environ
  • execv
  • execve
  • execv,
  • execve,
  • fchmod,
  • fchown,
  • fcntlFlock,
  • fcntlLong,
  • fcntlVoid,
  • fdatasync,
  • fstat,
  • fstatvfs

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • CodeWhisperer 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