Saturday, February 20, 2010
Java Networking
Java Networking: "import java.net.*; class DatagramTest { public static void main(String[] args) throws Exception { DatagramSocket socket; DatagramPacket packet; InetAddress address; byte[] message = new byte[256]; int port = 13; // // Send empty request // socket = new DatagramSocket(); address = InetAddress.getByName('moria.sdsu.edu'); packet = new DatagramPacket(message, message.length, address, port); socket.send(packet);"