com.jme3.network.kernel.udp
Class UdpKernel
java.lang.Object
com.jme3.network.kernel.AbstractKernel
com.jme3.network.kernel.udp.UdpKernel
- All Implemented Interfaces:
- Kernel
public class UdpKernel
- extends AbstractKernel
A Kernel implementation using UDP packets.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UdpKernel
public UdpKernel(java.net.InetAddress host,
int port)
UdpKernel
public UdpKernel(int port)
throws java.io.IOException
- Throws:
java.io.IOException
UdpKernel
public UdpKernel(java.net.InetSocketAddress address)
createHostThread
protected UdpKernel.HostThread createHostThread()
initialize
public void initialize()
- Description copied from interface:
Kernel
- Initializes the kernel and starts any internal processing.
terminate
public void terminate()
throws java.lang.InterruptedException
- Description copied from interface:
Kernel
- Gracefully terminates the kernel and stops any internal
daemon processing. This method will not return until all
internal threads have been shut down.
- Throws:
java.lang.InterruptedException
broadcast
public void broadcast(Filter<? super Endpoint> filter,
java.nio.ByteBuffer data,
boolean reliable,
boolean copy)
- Dispatches the data to all endpoints managed by the
kernel. 'routing' is currently ignored.
getEndpoint
protected Endpoint getEndpoint(java.net.SocketAddress address,
boolean create)
closeEndpoint
protected void closeEndpoint(UdpEndpoint p)
throws java.io.IOException
- Called by the endpoints when they need to be closed.
- Throws:
java.io.IOException
newData
protected void newData(java.net.DatagramPacket packet)
enqueueWrite
protected void enqueueWrite(Endpoint endpoint,
java.net.DatagramPacket packet)