FileDocCategorySizeDatePackage
UDPSender.javaAPI DocExample440Thu Apr 03 15:26:02 BST 1997None

UDPSender

public class UDPSender extends Object

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

  
    String s = "This is a test.";
  
    byte[] data = new byte[s.length()];
    s.getBytes(0, s.length(), data, 0);
    try {
      InetAddress ia = InetAddress.getByName("sunsite.unc.edu");
      int port = 7;
      DatagramPacket dp = new DatagramPacket(data, data.length, ia, port);
    }
    catch (UnknownHostException e) {
    }