projects
/
invirt/third/libt4.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
42852697e54df6e6f375c71fcb0292a3be0504f5
[invirt/third/libt4.git]
/
lock_demo.cc
1
//
2
// Lock demo
3
//
4
5
#include "lock_protocol.h"
6
#include "lock_client.h"
7
#include "rpc/rpc.h"
8
#include <arpa/inet.h>
9
#include <vector>
10
#include <stdlib.h>
11
#include <stdio.h>
12
13
int
14
main(int argc, char *argv[])
15
{
16
if(argc != 2) {
17
fprintf(stderr, "Usage: %s [host:]port\n", argv[0]);
18
return 1;
19
}
20
21
lock_client *lc = new lock_client(argv[1]);
22
printf ("stat returned %d\n", lc->stat("1"));
23
}