FileDocCategorySizeDatePackage
UDPEchoServer.javaAPI DocExample482Thu Apr 03 15:25:54 BST 1997None

UDPEchoServer

public class UDPEchoServer extends UDPServer

Fields Summary
protected static int
defaultPort
Constructors Summary
Methods Summary
public static voidrespond(java.net.DatagramSocket ds, java.net.DatagramPacket dp)


         

    DatagramPacket outgoing;
    
    try {
      outgoing = new DatagramPacket(dp.getData(), dp.getLength(), 
                                    dp.getAddress(), dp.getPort());
      ds.send(outgoing);
    }
    catch (IOException e) {
      System.err.println(e);
    }