| Constructor and Description |
|---|
UdpEndpoint(UdpKernel kernel,
long id,
java.net.SocketAddress address,
java.net.DatagramSocket socket) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this endpoint without flushing any of its
currently enqueued outbound data.
|
void |
close(boolean flush)
Closes this endpoint, optionally flushing any queued
data before closing.
|
java.lang.String |
getAddress()
Returns the transport specific remote address of this endpoint
as a string.
|
long |
getId()
Returns an ID that is unique for this endpoint within its
Kernel instance.
|
Kernel |
getKernel()
Returns the kernel to which this endpoint belongs.
|
protected java.net.SocketAddress |
getRemoteAddress() |
boolean |
isConnected()
Returns true if this endpoint is currently connected.
|
void |
send(java.nio.ByteBuffer data)
Sends data to the other end of the connection represented
by this endpoint.
|
java.lang.String |
toString() |
public UdpEndpoint(UdpKernel kernel, long id, java.net.SocketAddress address, java.net.DatagramSocket socket)
public Kernel getKernel()
Endpointprotected java.net.SocketAddress getRemoteAddress()
public void close()
Endpointpublic void close(boolean flush)
Endpointpublic long getId()
Endpointpublic java.lang.String getAddress()
EndpointgetAddress in interface Endpointpublic boolean isConnected()
EndpointisConnected in interface Endpointpublic void send(java.nio.ByteBuffer data)
Endpointpublic java.lang.String toString()
toString in class java.lang.Object