DatagramPacket

5 Comments

DatagramSocket and DatagramPacket (Client-Server Program using UDP/IP)

Program : DatagramSocket and DatagramPacket (Client-Server Program using UDP/IP) By : Kapil Lohia Program 1 :   import java.net.*;   class udpip_server { public static DatagramSocket ds; public static byte buffer[]=new byte[1024];   public static void Myserver() throws Exception { int pos=0; while(true) { int c=System.in.read(); switch(c) { case -1: System.out.println("Server quits"); return; case ‘\r’:break; […]