net.i2p.sam

## Class SAMv3DatagramServer

- java.lang.Object
- - net.i2p.sam.SAMv3DatagramServer

- All Implemented Interfaces:
    Handler

      class SAMv3DatagramServer
      extends Object
      implements Handler

  This is the thread listening on 127.0.0.1:7655 or as specified by sam.udp.host and sam.udp.port properties. This is used for both repliable and raw datagrams.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAMv3DatagramServer(SAMBridge parent, String host, int port, Properties props)` Does not start listener.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getHost()`
    `int` | `getPort()`
    `void` | `send(SocketAddress addr, ByteBuffer msg)`
    `void` | `start()` Only call once.
    `void` | `stopHandling()` Cannot be restarted.

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

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

- - ### Constructor Detail

    - #### SAMv3DatagramServer

          public SAMv3DatagramServer(SAMBridge parent,
                                     String host,
                                     int port,
                                     Properties props)
                              throws IOException

      Does not start listener. Caller must call start().
      Parameters:
        `parent` - may be null
        `props` - ignored for now
      Throws:
        `IOException`

  - ### Method Detail

    - #### getHost

          public String getHost()

    - #### getPort

          public int getPort()

    - #### send

          public void send(SocketAddress addr,
                           ByteBuffer msg)
                    throws IOException

      Throws:
        `IOException`

    - #### start

          public void start()

      Only call once.

    - #### stopHandling

          public void stopHandling()

      Cannot be restarted.
      Specified by:
        `stopHandling` in interface `Handler`