import edu.vt.cs.collab.cork.impl.inet.InetClient; import edu.vt.cs.collab.cork.ReplicatedObjectClient; /** * Simple CORK client, with little error handling. Should be * executed with server host and port number as arguments. */ public class Client { /** * Our replicated object client */ private ReplicatedObjectClient client = null; public Client(String host, int port) { try { client = new InetClient(host, port, InetClient.SOCKET); client.login("my-id", "my-password"); } catch(SecurityException se) { System.err.println("Login failed: "); se.printStackTrace(); } catch(Exception e) { System.err.println("Client connection error: "); e.printStackTrace(); } } public static void main(String[] args) { int port = Integer.parseInt(args[1]); Client c = new Client(args[0], port); } }