Class Native

java.lang.Object
jnr.unixsocket.Native

class Native extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final Native.LibC
     
    (package private) static final String[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static int
    accept(int fd, SockAddrUnix addr, jnr.ffi.byref.IntByReference len)
     
    (package private) static int
    bind(int fd, SockAddrUnix addr, int len)
     
    (package private) static int
    connect(int fd, SockAddrUnix addr, int len)
     
    static boolean
    getboolsockopt(int s, jnr.constants.platform.SocketLevel level, int optname)
     
    (package private) static jnr.constants.platform.Errno
     
    (package private) static String
     
    static int
    getsockopt(int s, jnr.constants.platform.SocketLevel level, int optname)
     
    static int
    getsockopt(int s, jnr.constants.platform.SocketLevel level, jnr.constants.platform.SocketOption optname, jnr.ffi.Struct data)
     
    (package private) static final Native.LibC
     
    (package private) static final Native.LibC
     
    (package private) static int
    listen(int fd, int backlog)
     
    static int
    recvfrom(int fd, ByteBuffer dst, SockAddrUnix addr)
     
    static int
    sendto(int fd, ByteBuffer src, SockAddrUnix addr, int len)
     
    static void
    setBlocking(int fd, boolean block)
     
    static int
    setsockopt(int s, jnr.constants.platform.SocketLevel level, jnr.constants.platform.SocketOption optname, boolean optval)
     
    static int
    setsockopt(int s, jnr.constants.platform.SocketLevel level, jnr.constants.platform.SocketOption optname, int optval)
     
    (package private) static int
    socket(jnr.constants.platform.ProtocolFamily domain, jnr.constants.platform.Sock type, int protocol)
     
    (package private) static int
    socketpair(jnr.constants.platform.ProtocolFamily domain, jnr.constants.platform.Sock type, int protocol, int[] sv)
     
    (package private) static String
    strerror(int error)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • libnames

      static final String[] libnames
    • INSTANCE

      static final Native.LibC INSTANCE
  • Constructor Details

    • Native

      Native()
  • Method Details

    • libsocket

      static final Native.LibC libsocket()
    • libc

      static final Native.LibC libc()
    • socket

      static int socket(jnr.constants.platform.ProtocolFamily domain, jnr.constants.platform.Sock type, int protocol) throws IOException
      Throws:
      IOException
    • socketpair

      static int socketpair(jnr.constants.platform.ProtocolFamily domain, jnr.constants.platform.Sock type, int protocol, int[] sv) throws IOException
      Throws:
      IOException
    • listen

      static int listen(int fd, int backlog)
    • bind

      static int bind(int fd, SockAddrUnix addr, int len)
    • accept

      static int accept(int fd, SockAddrUnix addr, jnr.ffi.byref.IntByReference len)
    • connect

      static int connect(int fd, SockAddrUnix addr, int len)
    • getLastErrorString

      static String getLastErrorString()
    • getLastError

      static jnr.constants.platform.Errno getLastError()
    • strerror

      static String strerror(int error)
    • setBlocking

      public static void setBlocking(int fd, boolean block)
    • setsockopt

      public static int setsockopt(int s, jnr.constants.platform.SocketLevel level, jnr.constants.platform.SocketOption optname, boolean optval)
    • setsockopt

      public static int setsockopt(int s, jnr.constants.platform.SocketLevel level, jnr.constants.platform.SocketOption optname, int optval)
    • getsockopt

      public static int getsockopt(int s, jnr.constants.platform.SocketLevel level, int optname)
    • getsockopt

      public static int getsockopt(int s, jnr.constants.platform.SocketLevel level, jnr.constants.platform.SocketOption optname, jnr.ffi.Struct data)
    • getboolsockopt

      public static boolean getboolsockopt(int s, jnr.constants.platform.SocketLevel level, int optname)
    • sendto

      public static int sendto(int fd, ByteBuffer src, SockAddrUnix addr, int len) throws IOException
      Throws:
      IOException
    • recvfrom

      public static int recvfrom(int fd, ByteBuffer dst, SockAddrUnix addr) throws IOException
      Throws:
      IOException