import java.io.*;
import java.net.*;
public class ClientDate {
public static void main(String args[])throws Exception
{
Socket S1 = new Socket("Local ip Address", Port);
PrintWriter out= new PrintWriter(S1.getOutputStream(),true);
BufferedReader b=new BufferedReader(new InputStreamReader(S1.getInputStream()));
String a=b.readLine();
System.out.println("Date and Time "+ a);
S1.close();
out.close();
}}
/* ip address =127.0.0.1 and port is any between 0 - 65536*/
No comments:
Post a Comment