FileDocCategorySizeDatePackage
DailyAdviceClient.javaAPI DocExample668Sat Jan 08 12:06:56 GMT 2005None

DailyAdviceClient

public class DailyAdviceClient extends Object

Fields Summary
Constructors Summary
Methods Summary
public voidgo()

        try {
           Socket s = new Socket("127.0.0.1", 4200);
           InputStreamReader streamReader = new InputStreamReader(s.getInputStream());
           BufferedReader reader = new BufferedReader(streamReader);
           String advice = reader.readLine();
           System.out.println("Today you should: " + advice);
        } catch(IOException ex) {
           ex.printStackTrace();
        }
     
public static voidmain(java.lang.String[] args)

       DailyAdviceClient client = new DailyAdviceClient();
       client.go();