All Packages Class Hierarchy This Package Previous Next Index
Class AcmeNet.Util.PacketEchoServer
AcmeNet.Util.PacketEchoServer
- public class PacketEchoServer
An object whose only purpose is to echo back packets that you send to it.
This class might be useful for testing parts of AcmeNet.
-
ni
- The NetworkInterface that this PacketEchoServer uses to send and receive packets.
-
PacketEchoServer()
- Create a PacketEchoServer, creating a new NetworkInterface for it to use.
-
PacketEchoServer(NetworkInterface)
- Create a PacketEchoServer that will use an existing NetworkInterface.
-
getAddress()
-
-
main(String[])
-
-
run()
- Executed by a daemon thread.
ni
protected NetworkInterface ni
- The NetworkInterface that this PacketEchoServer uses to send and receive packets.
PacketEchoServer
public PacketEchoServer() throws InternalException
- Create a PacketEchoServer, creating a new NetworkInterface for it to use.
- Throws: InternalException
- something weird went wrong
PacketEchoServer
public PacketEchoServer(NetworkInterface n)
- Create a PacketEchoServer that will use an existing NetworkInterface.
- Parameters:
- n - the NetworkInterface this PacketEchoServer should use
getAddress
public NetAddress getAddress()
- Returns:
- the address of this PacketEchoServer
run
public void run()
- Executed by a daemon thread. Don't call this.
main
public static void main(String argv[]) throws InternalException
All Packages Class Hierarchy This Package Previous Next Index