Package 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
A Kernel implementation using UDP packets.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classprotected class
- 
Field SummaryFields inherited from interface com.jme3.network.kernel.KernelEVENTS_PENDING
- 
Constructor SummaryConstructorsConstructorDescriptionUdpKernel(int port) UdpKernel(InetAddress host, int port) UdpKernel(InetSocketAddress address) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidbroadcast(Filter<? super Endpoint> filter, ByteBuffer data, boolean reliable, boolean copy) Dispatches the data to all endpoints managed by the kernel.protected voidCalled by the endpoints when they need to be closed.protected UdpKernel.HostThreadprotected voidenqueueWrite(Endpoint endpoint, DatagramPacket packet) protected EndpointgetEndpoint(SocketAddress address, boolean create) voidInitializes the kernel and starts any internal processing.protected voidnewData(DatagramPacket packet) voidGracefully terminates the kernel and stops any internal daemon processing.Methods inherited from class com.jme3.network.kernel.AbstractKerneladdEnvelope, addEvent, hasEnvelopes, nextEndpointId, nextEvent, read, reportError, wakeupReader
- 
Constructor Details- 
UdpKernel
- 
UdpKernel- Throws:
- IOException
 
- 
UdpKernel
 
- 
- 
Method Details- 
createHostThread
- 
initializepublic void initialize()Description copied from interface:KernelInitializes the kernel and starts any internal processing.
- 
terminateDescription copied from interface:KernelGracefully terminates the kernel and stops any internal daemon processing. This method will not return until all internal threads have been shut down.- Throws:
- InterruptedException
 
- 
broadcastpublic void broadcast(Filter<? super Endpoint> filter, ByteBuffer data, boolean reliable, boolean copy) Dispatches the data to all endpoints managed by the kernel. 'routing' is currently ignored.
- 
getEndpoint
- 
closeEndpointCalled by the endpoints when they need to be closed.- Throws:
- IOException
 
- 
newData
- 
enqueueWrite
 
-