Interface UdpServer.Listener

All Superinterfaces:
java.util.EventListener
Enclosing class:
UdpServer

public static interface UdpServer.Listener
extends java.util.EventListener

An interface for listening to events from a UdpServer. A single UdpServer.Event is shared for all invocations of these methods.

This code is released into the Public Domain. Since this is Public Domain, you don't need to worry about licensing, and you can simply copy this UdpServer.java file to your own package and use it as you like. Enjoy. Please consider leaving the following statement here in this code:

This UdpServer class was copied to this project from its source as found at iHarder.net.

Author:
Robert Harder, rharder@users.sourceforge.net
See Also:
UdpServer, UdpServer.Event

Method Summary
 void packetReceived(UdpServer.Event evt)
          Called when a packet is received.
 

Method Detail

packetReceived

void packetReceived(UdpServer.Event evt)
Called when a packet is received. This is called on the IO thread, so don't take too long, and if you want to offload the processing to another thread, be sure to copy the data out of the datagram since it will be clobbered the next time around.

Parameters:
evt - the event
See Also:
UdpServer.Event.getPacket()