tcep ip

46 Comments

java program for Client-Server Program using TCP/IP

Program : Client-Server Program using TCP/IP By : Kapil Lohia Program 1:   import java.net.*; import java.io.*;   class tcpip_server { public static void main(String args[]) throws IOException { ServerSocket n1=null; try { n1=new ServerSocket(98); } catch(IOException e) { System.err.println("Port 98 could not be found"); System.exit(1); } Socket c=null; try { c=n1.accept(); System.out.println("Connection from "+c); […]