Package io.activej.net.socket.udp
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Field Summary
Fields inherited from class io.activej.reactor.AbstractNioReactive
reactor -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()connect(io.activej.reactor.nio.NioReactor reactor, DatagramChannel channel) booleanisOpen()voidvoidreceive()voidsetInspector(@Nullable UdpSocket.Inspector inspector) voidsetReceiveBufferSize(int receiveBufferSize) toString()Methods inherited from class io.activej.reactor.AbstractNioReactive
getReactor
-
Method Details
-
connect
public static Promise<UdpSocket> connect(io.activej.reactor.nio.NioReactor reactor, DatagramChannel channel) -
setInspector
-
setReceiveBufferSize
public void setReceiveBufferSize(int receiveBufferSize) -
isOpen
public boolean isOpen() -
receive
- Specified by:
receivein interfaceIUdpSocket
-
onReadReady
public void onReadReady()- Specified by:
onReadReadyin interfaceio.activej.reactor.nio.NioChannelEventHandler
-
send
- Specified by:
sendin interfaceIUdpSocket
-
onWriteReady
public void onWriteReady()- Specified by:
onWriteReadyin interfaceio.activej.reactor.nio.NioChannelEventHandler
-
close
public void close()- Specified by:
closein interfaceIUdpSocket
-
toString
-