Interface TcpServer.Listener

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

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

An interface for listening to events from a TcpServer. A single TcpServer.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 TcpServer.java file to your own package and use it as you like. Enjoy. Please consider leaving the following statement here in this code:

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

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

Method Summary
 void socketReceived(TcpServer.Event evt)
          Called when a packet is received.
 

Method Detail

socketReceived

void socketReceived(TcpServer.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