X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/eb3d5c6416c0f0d1cad35e52af3231de7866fea8..26ade07ab0e62b98b452fbbd18edba0450035e35:/rpc/rpctest.cc diff --git a/rpc/rpctest.cc b/rpc/rpctest.cc index f2e8c7d..bf840d2 100644 --- 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; +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. @@ -79,7 +82,7 @@ static void startserver() { 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; @@ -97,7 +100,7 @@ static void testmarshall() { 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; @@ -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); - int rep; + int rep = -1; auto start = steady_clock::now();