Package com.jme3.network.kernel.udp
Class UdpEndpoint
java.lang.Object
com.jme3.network.kernel.udp.UdpEndpoint
- All Implemented Interfaces:
Endpoint
Endpoint implementation that encapsulates the
UDP connection information for return messaging,
identification of envelope sources, etc.
-
Constructor Summary
ConstructorsConstructorDescriptionUdpEndpoint(UdpKernel kernel, long id, SocketAddress address, DatagramSocket socket) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this endpoint without flushing any of its currently enqueued outbound data.voidclose(boolean flush) Closes this endpoint, optionally flushing any queued data before closing.Returns the transport specific remote address of this endpoint as a string.longgetId()Returns an ID that is unique for this endpoint within its Kernel instance.Returns the kernel to which this endpoint belongs.protected SocketAddressbooleanReturns true if this endpoint is currently connected.voidsend(ByteBuffer data) Sends data to the other end of the connection represented by this endpoint.toString()
-
Constructor Details
-
UdpEndpoint
-
-
Method Details
-
getKernel
Description copied from interface:EndpointReturns the kernel to which this endpoint belongs. -
getRemoteAddress
-
close
public void close()Description copied from interface:EndpointCloses this endpoint without flushing any of its currently enqueued outbound data. -
close
public void close(boolean flush) Description copied from interface:EndpointCloses this endpoint, optionally flushing any queued data before closing. As soon as this method is called, new send() calls will fail with an exception... even while close() is still flushing the earlier queued messages. -
getId
public long getId()Description copied from interface:EndpointReturns an ID that is unique for this endpoint within its Kernel instance. -
getAddress
Description copied from interface:EndpointReturns the transport specific remote address of this endpoint as a string. This may or may not be unique per endpoint depending on the type of transport.- Specified by:
getAddressin interfaceEndpoint
-
isConnected
public boolean isConnected()Description copied from interface:EndpointReturns true if this endpoint is currently connected.- Specified by:
isConnectedin interfaceEndpoint
-
send
Description copied from interface:EndpointSends data to the other end of the connection represented by this endpoint. -
toString
-