Class Msghdr

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Msghdr.Buffer
      An array of Msghdr structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
      • Nested classes/interfaces inherited from class org.lwjgl.system.Struct

        org.lwjgl.system.Struct.StructValidation
    • Constructor Summary

      Constructors 
      Constructor Description
      Msghdr​(java.nio.ByteBuffer container)
      Creates a Msghdr instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Msghdr calloc()
      Returns a new Msghdr instance allocated with memCalloc.
      static Msghdr.Buffer calloc​(int capacity)
      Returns a new Msghdr.Buffer instance allocated with memCalloc.
      static Msghdr.Buffer calloc​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new Msghdr.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static Msghdr calloc​(org.lwjgl.system.MemoryStack stack)
      Returns a new Msghdr instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static Msghdr create()
      Returns a new Msghdr instance allocated with BufferUtils.
      static Msghdr.Buffer create​(int capacity)
      Returns a new Msghdr.Buffer instance allocated with BufferUtils.
      static Msghdr create​(long address)
      Returns a new Msghdr instance for the specified memory address.
      static Msghdr.Buffer create​(long address, int capacity)
      Create a Msghdr.Buffer instance at the specified memory.
      static Msghdr createSafe​(long address)
      Like create, but returns null if address is NULL.
      static Msghdr.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      static Msghdr malloc()
      Returns a new Msghdr instance allocated with memAlloc.
      static Msghdr.Buffer malloc​(int capacity)
      Returns a new Msghdr.Buffer instance allocated with memAlloc.
      static Msghdr.Buffer malloc​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new Msghdr.Buffer instance allocated on the specified MemoryStack.
      static Msghdr malloc​(org.lwjgl.system.MemoryStack stack)
      Returns a new Msghdr instance allocated on the specified MemoryStack.
      java.nio.ByteBuffer msg_control()
      ancillary data (eg BSD filedesc passing)
      Msghdr msg_control​(java.nio.ByteBuffer value)
      Sets the address of the specified ByteBuffer to the msg_control() field.
      long msg_controllen()
      ancillary data buffer length
      int msg_flags()
      flags on received message
      Msghdr msg_flags​(int value)
      Sets the specified value to the msg_flags() field.
      IOVec.Buffer msg_iov()
      vector of data to send/receive into
      Msghdr msg_iov​(IOVec.Buffer value)
      Sets the address of the specified IOVec.Buffer to the msg_iov() field.
      long msg_iovlen()
      number of elements in the vector
      java.nio.ByteBuffer msg_name()
      address to send to/receive from
      Msghdr msg_name​(java.nio.ByteBuffer value)
      Sets the address of the specified ByteBuffer to the msg_name() field.
      int msg_namelen()
      length of address data
      static java.nio.ByteBuffer nmsg_control​(long struct)
      Unsafe version of msg_control.
      static void nmsg_control​(long struct, java.nio.ByteBuffer value)
      Unsafe version of msg_control.
      static long nmsg_controllen​(long struct)
      Unsafe version of msg_controllen().
      static void nmsg_controllen​(long struct, long value)
      Sets the specified value to the msg_controllen field of the specified struct.
      static int nmsg_flags​(long struct)
      Unsafe version of msg_flags().
      static void nmsg_flags​(long struct, int value)
      Unsafe version of msg_flags.
      static IOVec.Buffer nmsg_iov​(long struct)
      Unsafe version of msg_iov().
      static void nmsg_iov​(long struct, IOVec.Buffer value)
      Unsafe version of msg_iov.
      static long nmsg_iovlen​(long struct)
      Unsafe version of msg_iovlen().
      static void nmsg_iovlen​(long struct, long value)
      Sets the specified value to the msg_iovlen field of the specified struct.
      static java.nio.ByteBuffer nmsg_name​(long struct)
      Unsafe version of msg_name.
      static void nmsg_name​(long struct, java.nio.ByteBuffer value)
      Unsafe version of msg_name.
      static int nmsg_namelen​(long struct)
      Unsafe version of msg_namelen().
      static void nmsg_namelen​(long struct, int value)
      Sets the specified value to the msg_namelen field of the specified struct.
      Msghdr set​(java.nio.ByteBuffer msg_name, IOVec.Buffer msg_iov, java.nio.ByteBuffer msg_control, int msg_flags)
      Initializes this struct with the specified values.
      Msghdr set​(Msghdr src)
      Copies the specified struct data to this struct.
      int sizeof()  
      static void validate​(long struct)
      Validates pointer members that should not be NULL.
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull, validate
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MSG_NAME, MSG_NAMELEN, MSG_IOV, MSG_IOVLEN, MSG_CONTROL, MSG_CONTROLLEN, MSG_FLAGS

        The struct member offsets.
    • Constructor Detail

      • Msghdr

        public Msghdr​(java.nio.ByteBuffer container)
        Creates a Msghdr instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • msg_name

        public java.nio.ByteBuffer msg_name()
        address to send to/receive from
      • msg_namelen

        public int msg_namelen()
        length of address data
      • msg_iov

        public IOVec.Buffer msg_iov()
        vector of data to send/receive into
      • msg_iovlen

        public long msg_iovlen()
        number of elements in the vector
      • msg_control

        public java.nio.ByteBuffer msg_control()
        ancillary data (eg BSD filedesc passing)
      • msg_controllen

        public long msg_controllen()
        ancillary data buffer length
      • msg_flags

        public int msg_flags()
        flags on received message
      • msg_name

        public Msghdr msg_name​(java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the msg_name() field.
      • msg_control

        public Msghdr msg_control​(java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the msg_control() field.
      • msg_flags

        public Msghdr msg_flags​(int value)
        Sets the specified value to the msg_flags() field.
      • set

        public Msghdr set​(java.nio.ByteBuffer msg_name,
                          IOVec.Buffer msg_iov,
                          java.nio.ByteBuffer msg_control,
                          int msg_flags)
        Initializes this struct with the specified values.
      • set

        public Msghdr set​(Msghdr src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static Msghdr malloc()
        Returns a new Msghdr instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static Msghdr calloc()
        Returns a new Msghdr instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static Msghdr create()
        Returns a new Msghdr instance allocated with BufferUtils.
      • create

        public static Msghdr create​(long address)
        Returns a new Msghdr instance for the specified memory address.
      • createSafe

        @Nullable
        public static Msghdr createSafe​(long address)
        Like create, but returns null if address is NULL.
      • malloc

        public static Msghdr.Buffer malloc​(int capacity)
        Returns a new Msghdr.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static Msghdr.Buffer calloc​(int capacity)
        Returns a new Msghdr.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static Msghdr.Buffer create​(int capacity)
        Returns a new Msghdr.Buffer instance allocated with BufferUtils.
        Parameters:
        capacity - the buffer capacity
      • create

        public static Msghdr.Buffer create​(long address,
                                           int capacity)
        Create a Msghdr.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static Msghdr.Buffer createSafe​(long address,
                                               int capacity)
        Like create, but returns null if address is NULL.
      • malloc

        public static Msghdr malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new Msghdr instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static Msghdr calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new Msghdr instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static Msghdr.Buffer malloc​(int capacity,
                                           org.lwjgl.system.MemoryStack stack)
        Returns a new Msghdr.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static Msghdr.Buffer calloc​(int capacity,
                                           org.lwjgl.system.MemoryStack stack)
        Returns a new Msghdr.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nmsg_name

        public static java.nio.ByteBuffer nmsg_name​(long struct)
        Unsafe version of msg_name.
      • nmsg_namelen

        public static int nmsg_namelen​(long struct)
        Unsafe version of msg_namelen().
      • nmsg_iovlen

        public static long nmsg_iovlen​(long struct)
        Unsafe version of msg_iovlen().
      • nmsg_control

        public static java.nio.ByteBuffer nmsg_control​(long struct)
        Unsafe version of msg_control.
      • nmsg_controllen

        public static long nmsg_controllen​(long struct)
        Unsafe version of msg_controllen().
      • nmsg_flags

        public static int nmsg_flags​(long struct)
        Unsafe version of msg_flags().
      • nmsg_name

        public static void nmsg_name​(long struct,
                                     java.nio.ByteBuffer value)
        Unsafe version of msg_name.
      • nmsg_namelen

        public static void nmsg_namelen​(long struct,
                                        int value)
        Sets the specified value to the msg_namelen field of the specified struct.
      • nmsg_iov

        public static void nmsg_iov​(long struct,
                                    IOVec.Buffer value)
        Unsafe version of msg_iov.
      • nmsg_iovlen

        public static void nmsg_iovlen​(long struct,
                                       long value)
        Sets the specified value to the msg_iovlen field of the specified struct.
      • nmsg_control

        public static void nmsg_control​(long struct,
                                        java.nio.ByteBuffer value)
        Unsafe version of msg_control.
      • nmsg_controllen

        public static void nmsg_controllen​(long struct,
                                           long value)
        Sets the specified value to the msg_controllen field of the specified struct.
      • nmsg_flags

        public static void nmsg_flags​(long struct,
                                      int value)
        Unsafe version of msg_flags.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate