public void setServer(String address, int port) throws UnknownHostException, IOException {
        oOut.close();
        oIn.close();
        server.close();
        server = new Socket(address, port);
        oOut = new ObjectOutputStream(server.getOutputStream());
        oIn = new ObjectInputStream(server.getInputStream());
        oOut.writeObject(self);
    }