Class UdpSocket

java.lang.Object
io.activej.reactor.AbstractNioReactive
io.activej.net.socket.udp.UdpSocket
All Implemented Interfaces:
IUdpSocket, io.activej.reactor.nio.NioChannelEventHandler, io.activej.reactor.NioReactive, io.activej.reactor.Reactive

public final class UdpSocket extends io.activej.reactor.AbstractNioReactive implements IUdpSocket, io.activej.reactor.nio.NioChannelEventHandler
  • Method Details

    • connect

      public static Promise<UdpSocket> connect(io.activej.reactor.nio.NioReactor reactor, DatagramChannel channel)
    • setInspector

      public void setInspector(@Nullable @Nullable UdpSocket.Inspector inspector)
    • setReceiveBufferSize

      public void setReceiveBufferSize(int receiveBufferSize)
    • isOpen

      public boolean isOpen()
    • receive

      public Promise<UdpPacket> receive()
      Specified by:
      receive in interface IUdpSocket
    • onReadReady

      public void onReadReady()
      Specified by:
      onReadReady in interface io.activej.reactor.nio.NioChannelEventHandler
    • send

      public Promise<Void> send(UdpPacket packet)
      Specified by:
      send in interface IUdpSocket
    • onWriteReady

      public void onWriteReady()
      Specified by:
      onWriteReady in interface io.activej.reactor.nio.NioChannelEventHandler
    • close

      public void close()
      Specified by:
      close in interface IUdpSocket
    • toString

      public String toString()
      Overrides:
      toString in class Object