FileDocCategorySizeDatePackage
Pulse.javaAPI DocExample602Mon May 01 14:41:46 BST 2000None

Pulse

public class Pulse extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

        DatagramSocket s =
          new DatagramSocket( Integer.parseInt(argv[0]) );

        while ( true ) {
            DatagramPacket packet =
              new DatagramPacket(new byte [1024], 1024);
            s.receive( packet );
            String message = new String( packet.getData(  ) );
            System.out.println( "Heartbeat from: "
              + packet.getAddress().getHostName(  )
              + " - " + message );
        }