TimedWriter  w=new TimedWriter(); InetAddress  local=null; InetAddress  remote=null; int          port=0; Socket       sock=null ;  if(args.length != 3) { log.error("TimedWriter <local host> <remote host> <remote port>"); return; }
TimedWriter  w=new TimedWriter(); InetAddress  local=null; InetAddress  remote=null; int          port=0; Socket       sock=null ;
    public static void main(String[] args) {	TimedWriter  w=new TimedWriter();	InetAddress  local=null;	InetAddress  remote=null;	int          port=0;	Socket       sock=null ;		if(args.length != 3) {	    log.error("TimedWriter <local host> <remote host> <remote port>");	    return;	}	try {	    local=InetAddress.getByName(args[0]);	    remote=InetAddress.getByName(args[1]);	    port=Integer.parseInt(args[2]);	}	catch(Exception e) {	    log.error("Could find host " + remote);	    return;	}	while(true) {	    	    try {		sock=w.createSocket(local, remote, port, 3000);		if(sock != null) {		    System.out.println("Connection created");		    return;		}	    }	    catch(TimedWriter.Timeout timeout) {		log.error("Timed out creating socket");	    }	    catch(Exception io_ex) {		log.error("Connection could not be created, retrying");		Util.sleep(2000);	    }	}    }