void
evrpc_free(struct evrpc_base *base)
{
+ struct evrpc *rpc;
+
+ while ((rpc = TAILQ_FIRST(&base->registered_rpcs)) != NULL) {
+ assert(evrpc_unregister_rpc(base, rpc->uri));
+ }
+ free(base);
}
static void evrpc_pool_schedule(struct evrpc_pool *pool);
/* functions to start up the rpc system */
struct evrpc_base *evrpc_init(struct evhttp *server);
+/* frees the base - for now, you are responsible for making sure that no rpcs are ongoing */
+void evrpc_free(struct evrpc_base *);
+
/* this macro is used to register RPCs with the HTTP Server */
#define EVRPC_REGISTER(base, name, request, reply, callback, cbarg) \
do { \