import java.net.*;
import java.io.*;
public class server
{
public static void main(String args[]) throws Exception
{
ServerSocket ss=new ServerSocket(2000);
Socket s=ss.accept();
BufferedReader br=new BufferedReader(newInputStreamReader(s.getInputStream()));
double rad,area;
String result;
rad=Double.parseDouble(br.readLine());
System.out.println("From Client : "+rad);
area=Math.PI*rad*rad;
result="Area is "+area;
PrintStream ps=new PrintStream(s.getOutputStream());
ps.println(result);
br.close();
ps.close();
s.close();
ss.close();
}
}
public class client
{
public static void main(String args[]) throws Exception
{
Socket s=new Socket("192.168.0.19",2000);
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String rad;
System.out.println("Enter radius of the circle ");
rad=br.readLine();
PrintStream ps=new PrintStream(s.getOutputStream());
ps.println(rad);
BufferedReader fs=new BufferedReader(new InputStreamReader(s.getInputStream()));
String result=fs.readLine();
System.out.println("From Server : "+result);
br.close();
fs.close();
ps.close();
s.close();
}
}
Here is a small application to protect your USB data by keeping a password. It is also useful to " USB flash drives, thumb drives, memory sticks, external drives, and memory cards ." With USB Secure, you will never have to worry again about lost or stolen USB/External drives. USB Secure offers multiple protection layers ensuring maximum security of your password-protected data on any portable medium. USB Secure secures your sensitive data against theft, accidental loss, and data leak. Independent USB Secure is fast, reliable, and PC independent, making it the most flexible and robust portable drive protection software in the market. USB Secure does not install any kernel or filter drives, taking away the hassle of requiring administrator rights to password protect portable devices. Protecting your sensitive data with USB Secure is a one-click process, requiring no lengthy installations. Access to your protected data on a portable drive is convenient too. ...
Comments
Post a Comment