Posts

Showing posts from October, 2020

ONE TO ONE CHAT APP

//Code for Friend With Server import java.net.*; import java.io.*; import java.util.Scanner; class clientUnit extends Thread{     PrintWriter out=null;     BufferedReader in=null;     String keyboardinput;     Socket conn=null;     String me="Roshan";     String NAME;     public clientUnit(Socket conn){         try{             this.conn=conn;             this.out = new PrintWriter(conn.getOutputStream(),true);             this.in=new BufferedReader(new InputStreamReader(conn.getInputStream()));         }         catch (IOException ioe){             System.err.println("couldn't communicate with client");         }     }     public void run(){         try{       ...