io.vertx.core.datagram

## Class DatagramSocketOptions

- java.lang.Object
- - io.vertx.core.net.NetworkOptions
  - - io.vertx.core.datagram.DatagramSocketOptions

-     public class DatagramSocketOptions
      extends NetworkOptions

  Options used to configure a datagram socket.
  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_BROADCAST` The default value of broadcast for the socket = false
    `static boolean` | `DEFAULT_IPV6` The default value of use IP v6 = false
    `static boolean` | `DEFAULT_LOOPBACK_MODE_DISABLED` The default value of loopback disabled = true
    `static String` | `DEFAULT_MULTICAST_NETWORK_INTERFACE` The default value of multicast network interface = null
    `static int` | `DEFAULT_MULTICAST_TIME_TO_LIVE` The default value of multicast disabled = -1
    `static boolean` | `DEFAULT_REUSE_ADDRESS` The default value of reuse address = false

    - ### Fields inherited from class io.vertx.core.net.NetworkOptions

      `DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DatagramSocketOptions()` Default constructor
    `DatagramSocketOptions(DatagramSocketOptions other)` Copy constructor
    `DatagramSocketOptions(JsonObject json)` Constructor to create options from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getMulticastNetworkInterface()` Get the multicast network interface address
    `int` | `getMulticastTimeToLive()`
    `int` | `getReceiveBufferSize()` Return the TCP receive buffer size, in bytes
    `int` | `getSendBufferSize()` Return the TCP send buffer size, in bytes.
    `int` | `getTrafficClass()`
    `int` | `hashCode()`
    `boolean` | `isBroadcast()`
    `boolean` | `isIpV6()`
    `boolean` | `isLoopbackModeDisabled()`
    `DatagramSocketOptions` | `setBroadcast(boolean broadcast)` Set if the socket can receive broadcast packets
    `DatagramSocketOptions` | `setIpV6(boolean ipV6)` Set if IP v6 should be used
    `DatagramSocketOptions` | `setLogActivity(boolean logEnabled)` Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
    `DatagramSocketOptions` | `setLoopbackModeDisabled(boolean loopbackModeDisabled)` Set if loopback mode is disabled
    `DatagramSocketOptions` | `setMulticastNetworkInterface(String multicastNetworkInterface)` Set the multicast network interface address
    `DatagramSocketOptions` | `setMulticastTimeToLive(int multicastTimeToLive)` Set the multicast ttl value
    `DatagramSocketOptions` | `setReceiveBufferSize(int receiveBufferSize)` Set the TCP receive buffer size
    `DatagramSocketOptions` | `setReuseAddress(boolean reuseAddress)` Set the value of reuse address
    `DatagramSocketOptions` | `setSendBufferSize(int sendBufferSize)` Set the TCP send buffer size
    `DatagramSocketOptions` | `setTrafficClass(int trafficClass)` Set the value of traffic class

    - ### Methods inherited from class io.vertx.core.net.NetworkOptions

      `getLogActivity, isReuseAddress`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_BROADCAST

          public static final boolean DEFAULT_BROADCAST

      The default value of broadcast for the socket = false
      See Also:
        Constant Field Values

    - #### DEFAULT_LOOPBACK_MODE_DISABLED

          public static final boolean DEFAULT_LOOPBACK_MODE_DISABLED

      The default value of loopback disabled = true
      See Also:
        Constant Field Values

    - #### DEFAULT_MULTICAST_TIME_TO_LIVE

          public static final int DEFAULT_MULTICAST_TIME_TO_LIVE

      The default value of multicast disabled = -1
      See Also:
        Constant Field Values

    - #### DEFAULT_MULTICAST_NETWORK_INTERFACE

          public static final String DEFAULT_MULTICAST_NETWORK_INTERFACE

      The default value of multicast network interface = null

    - #### DEFAULT_REUSE_ADDRESS

          public static final boolean DEFAULT_REUSE_ADDRESS

      The default value of reuse address = false
      See Also:
        Constant Field Values

    - #### DEFAULT_IPV6

          public static final boolean DEFAULT_IPV6

      The default value of use IP v6 = false
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DatagramSocketOptions

          public DatagramSocketOptions()

      Default constructor

    - #### DatagramSocketOptions

          public DatagramSocketOptions(DatagramSocketOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### DatagramSocketOptions

          public DatagramSocketOptions(JsonObject json)

      Constructor to create options from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### getSendBufferSize

          public int getSendBufferSize()

      Description copied from class: `NetworkOptions`
      Return the TCP send buffer size, in bytes.
      Overrides:
        `getSendBufferSize` in class `NetworkOptions`
      Returns:
        the send buffer size

    - #### setSendBufferSize

          public DatagramSocketOptions setSendBufferSize(int sendBufferSize)

      Description copied from class: `NetworkOptions`
      Set the TCP send buffer size
      Overrides:
        `setSendBufferSize` in class `NetworkOptions`
      Parameters:
        `sendBufferSize` - the buffers size, in bytes
      Returns:
        a reference to this, so the API can be used fluently

    - #### getReceiveBufferSize

          public int getReceiveBufferSize()

      Description copied from class: `NetworkOptions`
      Return the TCP receive buffer size, in bytes
      Overrides:
        `getReceiveBufferSize` in class `NetworkOptions`
      Returns:
        the receive buffer size

    - #### setReceiveBufferSize

          public DatagramSocketOptions setReceiveBufferSize(int receiveBufferSize)

      Description copied from class: `NetworkOptions`
      Set the TCP receive buffer size
      Overrides:
        `setReceiveBufferSize` in class `NetworkOptions`
      Parameters:
        `receiveBufferSize` - the buffers size, in bytes
      Returns:
        a reference to this, so the API can be used fluently

    - #### setReuseAddress

          public DatagramSocketOptions setReuseAddress(boolean reuseAddress)

      Description copied from class: `NetworkOptions`
      Set the value of reuse address
      Overrides:
        `setReuseAddress` in class `NetworkOptions`
      Parameters:
        `reuseAddress` - the value of reuse address
      Returns:
        a reference to this, so the API can be used fluently

    - #### getTrafficClass

          public int getTrafficClass()

      Overrides:
        `getTrafficClass` in class `NetworkOptions`
      Returns:
        the value of traffic class

    - #### setTrafficClass

          public DatagramSocketOptions setTrafficClass(int trafficClass)

      Description copied from class: `NetworkOptions`
      Set the value of traffic class
      Overrides:
        `setTrafficClass` in class `NetworkOptions`
      Parameters:
        `trafficClass` - the value of traffic class
      Returns:
        a reference to this, so the API can be used fluently

    - #### isBroadcast

          public boolean isBroadcast()

      Returns:
        true if the socket receive broadcast packets?

    - #### setBroadcast

          public DatagramSocketOptions setBroadcast(boolean broadcast)

      Set if the socket can receive broadcast packets
      Parameters:
        `broadcast` - true if the socket can receive broadcast packets
      Returns:
        a reference to this, so the API can be used fluently

    - #### isLoopbackModeDisabled

          public boolean isLoopbackModeDisabled()

      Returns:
        true if loopback mode is disabled

    - #### setLoopbackModeDisabled

          public DatagramSocketOptions setLoopbackModeDisabled(boolean loopbackModeDisabled)

      Set if loopback mode is disabled
      Parameters:
        `loopbackModeDisabled` - true if loopback mode is disabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMulticastTimeToLive

          public int getMulticastTimeToLive()

      Returns:
        the multicast ttl value

    - #### setMulticastTimeToLive

          public DatagramSocketOptions setMulticastTimeToLive(int multicastTimeToLive)

      Set the multicast ttl value
      Parameters:
        `multicastTimeToLive` - the multicast ttl value
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMulticastNetworkInterface

          public String getMulticastNetworkInterface()

      Get the multicast network interface address
      Returns:
        the interface address

    - #### setMulticastNetworkInterface

          public DatagramSocketOptions setMulticastNetworkInterface(String multicastNetworkInterface)

      Set the multicast network interface address
      Parameters:
        `multicastNetworkInterface` - the address
      Returns:
        a reference to this, so the API can be used fluently

    - #### isIpV6

          public boolean isIpV6()

      Returns:
        true if IP v6 be used?

    - #### setIpV6

          public DatagramSocketOptions setIpV6(boolean ipV6)

      Set if IP v6 should be used
      Parameters:
        `ipV6` - true if IP v6 should be used
      Returns:
        a reference to this, so the API can be used fluently

    - #### setLogActivity

          public DatagramSocketOptions setLogActivity(boolean logEnabled)

      Description copied from class: `NetworkOptions`
      Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
      Overrides:
        `setLogActivity` in class `NetworkOptions`
      Parameters:
        `logEnabled` - true for logging the network activity
      Returns:
        a reference to this, so the API can be used fluently

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `NetworkOptions`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `NetworkOptions`

Copyright © 2016. All rights reserved.