public static Client getClient() {
        TTransport transport = new TSocket("localhost", 12345);
        if (!transport.isOpen()) {
            try {
                transport.open();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
 
        TProtocol protocol = new TBinaryProtocol(transport);
        return new Client(protocol);
    }