DatagramSocket
Date: 2016-06-24

java.net

## Class DatagramSocket

- java.lang.Object
- - java.net.DatagramSocket

- Direct Known Subclasses:
    MulticastSocket

      public class DatagramSocket
      extends Object

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `DatagramSocket()`
    `protected` | `DatagramSocket(DatagramSocketImpl var0)`
    `` | `DatagramSocket(int var0)`
    `` | `DatagramSocket(int var0, InetAddress var1)`
    `` | `DatagramSocket(SocketAddress var0)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `bind(SocketAddress var0)`
    `void` | `close()`
    `void` | `connect(InetAddress var0, int var1)`
    `void` | `connect(SocketAddress var0)`
    `void` | `disconnect()`
    `boolean` | `getBroadcast()`
    `InetAddress` | `getInetAddress()`
    `InetAddress` | `getLocalAddress()`
    `int` | `getLocalPort()`
    `SocketAddress` | `getLocalSocketAddress()`
    `int` | `getPort()`
    `int` | `getReceiveBufferSize()`
    `SocketAddress` | `getRemoteSocketAddress()`
    `boolean` | `getReuseAddress()`
    `int` | `getSendBufferSize()`
    `int` | `getSoTimeout()`
    `int` | `getTrafficClass()`
    `boolean` | `isBound()`
    `boolean` | `isClosed()`
    `boolean` | `isConnected()`
    `void` | `receive(DatagramPacket var0)`
    `void` | `send(DatagramPacket var0)`
    `void` | `setBroadcast(boolean var0)`
    `static void` | `setDatagramSocketImplFactory(DatagramSocketImplFactory var0)`
    `void` | `setReceiveBufferSize(int var0)`
    `void` | `setReuseAddress(boolean var0)`
    `void` | `setSendBufferSize(int var0)`
    `void` | `setSoTimeout(int var0)`
    `void` | `setTrafficClass(int var0)`

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

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

- - ### Constructor Detail

    - #### DatagramSocket

          public DatagramSocket()
                         throws SocketException

      Throws:
        `SocketException`

    - #### DatagramSocket

          public DatagramSocket(int var0)
                         throws SocketException

      Throws:
        `SocketException`

    - #### DatagramSocket

          public DatagramSocket(int var0,
                        InetAddress var1)
                         throws SocketException

      Throws:
        `SocketException`

    - #### DatagramSocket

          protected DatagramSocket(DatagramSocketImpl var0)

    - #### DatagramSocket

          public DatagramSocket(SocketAddress var0)
                         throws SocketException

      Throws:
        `SocketException`

  - ### Method Detail

    - #### bind

          public void bind(SocketAddress var0)
                    throws SocketException

      Throws:
        `SocketException`

    - #### close

          public void close()

    - #### connect

          public void connect(InetAddress var0,
                     int var1)

    - #### connect

          public void connect(SocketAddress var0)
                       throws SocketException

      Throws:
        `SocketException`

    - #### disconnect

          public void disconnect()

    - #### getBroadcast

          public boolean getBroadcast()
                               throws SocketException

      Throws:
        `SocketException`

    - #### getInetAddress

          public InetAddress getInetAddress()

    - #### getLocalAddress

          public InetAddress getLocalAddress()

    - #### getLocalPort

          public int getLocalPort()

    - #### getLocalSocketAddress

          public SocketAddress getLocalSocketAddress()

    - #### getPort

          public int getPort()

    - #### getReceiveBufferSize

          public int getReceiveBufferSize()
                                   throws SocketException

      Throws:
        `SocketException`

    - #### getRemoteSocketAddress

          public SocketAddress getRemoteSocketAddress()

    - #### getReuseAddress

          public boolean getReuseAddress()
                                  throws SocketException

      Throws:
        `SocketException`

    - #### getSendBufferSize

          public int getSendBufferSize()
                                throws SocketException

      Throws:
        `SocketException`

    - #### getSoTimeout

          public int getSoTimeout()
                           throws SocketException

      Throws:
        `SocketException`

    - #### getTrafficClass

          public int getTrafficClass()
                              throws SocketException

      Throws:
        `SocketException`

    - #### isBound

          public boolean isBound()

    - #### isClosed

          public boolean isClosed()

    - #### isConnected

          public boolean isConnected()

    - #### receive

          public void receive(DatagramPacket var0)
                       throws IOException

      Throws:
        `IOException`

    - #### send

          public void send(DatagramPacket var0)
                    throws IOException

      Throws:
        `IOException`

    - #### setBroadcast

          public void setBroadcast(boolean var0)
                            throws SocketException

      Throws:
        `SocketException`

    - #### setDatagramSocketImplFactory

          public static void setDatagramSocketImplFactory(DatagramSocketImplFactory var0)
                                                   throws IOException

      Throws:
        `IOException`

    - #### setReceiveBufferSize

          public void setReceiveBufferSize(int var0)
                                    throws SocketException

      Throws:
        `SocketException`

    - #### setReuseAddress

          public void setReuseAddress(boolean var0)
                               throws SocketException

      Throws:
        `SocketException`

    - #### setSendBufferSize

          public void setSendBufferSize(int var0)
                                 throws SocketException

      Throws:
        `SocketException`

    - #### setSoTimeout

          public void setSoTimeout(int var0)
                            throws SocketException

      Throws:
        `SocketException`

    - #### setTrafficClass

          public void setTrafficClass(int var0)
                               throws SocketException

      Throws:
        `SocketException`