Enum Class UdpFlags

java.lang.Object
java.lang.Enum<UdpFlags>
com.oracle.libuv.UdpFlags
All Implemented Interfaces:
Serializable, Comparable<UdpFlags>, java.lang.constant.Constable

public enum UdpFlags extends Enum<UdpFlags>
Flags used in UDPHandle#bind(int, String, boolean)
  • Enum Constant Details

    • UV_UDP_IPV6ONLY

      public static final UdpFlags UV_UDP_IPV6ONLY
      Disables dual stack mode.
    • UV_UDP_PARTIAL

      public static final UdpFlags UV_UDP_PARTIAL
      Indicates message was truncated because read buffer was too small. The remainder was discarded by the OS. Used in uv_udp_recv_cb.
    • UV_UDP_REUSEADDR

      public static final UdpFlags UV_UDP_REUSEADDR
      Indicates if SO_REUSEADDR will be set when binding the handle. This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other Unix platforms, it sets the SO_REUSEADDR flag. What that means is that multiple threads or processes can bind to the same address without error (provided they all set the flag) but only the last one to bind will receive any traffic, in effect "stealing" the port from the previous listener.
    • UV_UDP_MMSG_CHUNK

      public static final UdpFlags UV_UDP_MMSG_CHUNK
      Indicates that the message was received by recvmmsg, so the buffer provided must not be freed by the recv_cb callback.
    • UV_UDP_MMSG_FREE

      public static final UdpFlags UV_UDP_MMSG_FREE
      Indicates that the buffer provided has been fully utilized by recvmmsg and that it should now be freed by the recv_cb callback. When this flag is set in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL.
    • UV_UDP_LINUX_RECVERR

      public static final UdpFlags UV_UDP_LINUX_RECVERR
      Indicates if IP_RECVERR/IPV6_RECVERR will be set when binding the handle. This sets IP_RECVERR for IPv4 and IPV6_RECVERR for IPv6 UDP sockets on Linux. This stops the Linux kernel from suppressing some ICMP error messages and enables full ICMP error reporting for faster failover. This flag is no-op on platforms other than Linux.
    • UV_UDP_RECVMMSG

      public static final UdpFlags UV_UDP_RECVMMSG
      Indicates that recvmmsg should be used, if available.
  • Field Details

    • value

      public final int value
  • Method Details

    • values

      public static UdpFlags[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UdpFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<UdpFlags>