public boolean connect() { connection = new ObjectStreamConnection(host, port, 1); connected = connection.open(); if (connected) { connection.addConnectionListener(connectionListener); } return connected;
public void connect() throws UnknownHostException, IOException { socket = new Socket(host, port); pump = new Thread(this, "Client Pump");
    public boolean connect() {        connection = new ObjectStreamConnection(host, port, 1);        connected = connection.open();        if (connected) {            connection.addConnectionListener(connectionListener);                   }        return connected;    }