projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplifications and clean-ups
[invirt/third/libt4.git]
/
rpc
/
rpctest.cc
diff --git
a/rpc/rpctest.cc
b/rpc/rpctest.cc
index
f2e8c7d
..
bf840d2
100644
(file)
--- a/
rpc/rpctest.cc
+++ b/
rpc/rpctest.cc
@@
-17,6
+17,9
@@
static rpcc *clients[NUM_CL]; // client rpc object
static string dst; //server's ip address
static in_port_t port;
static string dst; //server's ip address
static in_port_t port;
+using std::cout;
+using std::endl;
+
// server-side handlers. they must be methods of some class
// to simplify rpcs::reg(). a server process can have handlers
// from multiple classes.
// server-side handlers. they must be methods of some class
// to simplify rpcs::reg(). a server process can have handlers
// from multiple classes.
@@
-79,7
+82,7
@@
static void startserver() {
static void testmarshall() {
marshall m;
rpc_protocol::request_header rh{1,2,3,4,5};
static void testmarshall() {
marshall m;
rpc_protocol::request_header rh{1,2,3,4,5};
- m.pack_header(rh);
+ m.write_header(rh);
VERIFY(((string)m).size()==rpc_protocol::RPC_HEADER_SZ);
int i = 12345;
unsigned long long l = 1223344455L;
VERIFY(((string)m).size()==rpc_protocol::RPC_HEADER_SZ);
int i = 12345;
unsigned long long l = 1223344455L;
@@
-97,7
+100,7
@@
static void testmarshall() {
unmarshall un(b, true);
rpc_protocol::request_header rh1;
unmarshall un(b, true);
rpc_protocol::request_header rh1;
- un.unpack_header(rh1);
+ un.read_header(rh1);
VERIFY(memcmp(&rh,&rh1,sizeof(rh))==0);
int i1;
unsigned long long l1;
VERIFY(memcmp(&rh,&rh1,sizeof(rh))==0);
int i1;
unsigned long long l1;
@@
-132,7
+135,7
@@
static void client1(size_t cl) {
for(int i = 0; i < 100; i++){
int which = (random() % 2);
int arg = (random() % 1000);
for(int i = 0; i < 100; i++){
int which = (random() % 2);
int arg = (random() % 1000);
- int rep;
+ int rep = -1;
auto start = steady_clock::now();
auto start = steady_clock::now();