## net.i2p.router.transport.udp
Class UDPEndpoint

    java.lang.Object
      net.i2p.router.transport.udp.UDPEndpoint

    public class UDPEndpoint

extends java.lang.Object

Coordinate the low level datagram socket, managing the UDPSender and UDPReceiver

Constructor Summary
`UDPEndpoint(RouterContext ctx, UDPTransport transport, int listenPort, java.net.InetAddress bindAddress)`

Method Summary
`int` `getListenPort()`
`UDPSender` `getSender()`
`UDPPacket` `receive()` Blocking call to receive the next inbound UDP packet from any peer.
`int` `send(UDPPacket packet)` Add the packet to the outobund queue to be sent ASAP (as allowed by the bandwidth limiter)
`void` `setListenPort(int newPort)`
`void` `shutdown()`
`void` `startup()`
`void` `updateListenPort(int newPort)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UDPEndpoint

    public UDPEndpoint(RouterContext ctx,
                       UDPTransport transport,
                       int listenPort,
                       java.net.InetAddress bindAddress)
                throws java.net.SocketException

Throws:
  `java.net.SocketException`

Method Detail

### startup

    public void startup()

### shutdown

    public void shutdown()

### setListenPort

    public void setListenPort(int newPort)

### updateListenPort

    public void updateListenPort(int newPort)

### getListenPort

    public int getListenPort()

### getSender

    public UDPSender getSender()

### send

    public int send(UDPPacket packet)

  Add the packet to the outobund queue to be sent ASAP (as allowed by the bandwidth limiter)

  Returns:
    number of packets in the send queue

### receive

    public UDPPacket receive()

  Blocking call to receive the next inbound UDP packet from any peer.