Class Msghdr.Buffer

All Implemented Interfaces:
AutoCloseable, Iterable<Msghdr>, NativeResource, Pointer
Enclosing class:
Msghdr

public static class Msghdr.Buffer extends StructBuffer<Msghdr, Msghdr.Buffer> implements NativeResource
An array of Msghdr structs.
  • Constructor Details

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new Msghdr.Buffer instance backed by the specified container.

      Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by Msghdr.SIZEOF, and its mark will be undefined.

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

    • Buffer

      public Buffer(long address, int cap)
  • Method Details

    • msg_name

      @NativeType("void *") public ByteBuffer msg_name()
      Returns:
      a ByteBuffer view of the data pointed to by the msg_name field.
    • msg_namelen

      @NativeType("socklen_t") public int msg_namelen()
      Returns:
      the value of the msg_namelen field.
    • msg_iov

      @NativeType("struct iovec *") public IOVec.Buffer msg_iov()
      Returns:
      a IOVec.Buffer view of the struct array pointed to by the msg_iov field.
    • msg_iovlen

      @NativeType("size_t") public long msg_iovlen()
      Returns:
      the value of the msg_iovlen field.
    • msg_control

      @NativeType("void *") public ByteBuffer msg_control()
      Returns:
      a ByteBuffer view of the data pointed to by the msg_control field.
    • msg_controllen

      @NativeType("size_t") public long msg_controllen()
      Returns:
      the value of the msg_controllen field.
    • msg_flags

      public int msg_flags()
      Returns:
      the value of the msg_flags field.
    • msg_name

      public Msghdr.Buffer msg_name(@NativeType("void *") ByteBuffer value)
      Sets the address of the specified ByteBuffer to the msg_name field.
    • msg_iov

      public Msghdr.Buffer msg_iov(@NativeType("struct iovec *") IOVec.Buffer value)
      Sets the address of the specified IOVec.Buffer to the msg_iov field.
    • msg_control

      public Msghdr.Buffer msg_control(@NativeType("void *") ByteBuffer value)
      Sets the address of the specified ByteBuffer to the msg_control field.
    • msg_flags

      public Msghdr.Buffer msg_flags(int value)
      Sets the specified value to the msg_flags field.