7 // Manage a cache of RPC connections. Typical usage:
9 // rpc_protocol::status ret = rpc_protocol::bind_failure;
10 // if (rpcc *cl = h.safebind())
11 // ret = cl->call(...);
12 // assuming dst is a string holding the host:port of the RPC server you want to
15 // If the calling program has not contacted dst before, safebind() will create
16 // a new connection, call bind(), and return an rpcc*, or 0 if bind() failed.
17 // if the program has previously contacted dst, safebind() just returns the
18 // previously created rpcc*. Because safebind() may block, callers should
19 // probably not hold mutexes.
23 shared_ptr<class hinfo> h;
24 const string destination_;
26 handle(const string & destination);