Home | History | Annotate | Download | only in libevent

Lines Matching defs:rpc

84 	struct evrpc *rpc;
87 while ((rpc = TAILQ_FIRST(&base->registered_rpcs)) != NULL) {
88 assert(evrpc_unregister_rpc(base, rpc->uri));
185 * Registers a new RPC with the HTTP server. The evrpc object is expected
198 event_err(1, "%s: failed to register rpc at %s",
208 evrpc_register_rpc(struct evrpc_base *base, struct evrpc *rpc,
211 char *constructed_uri = evrpc_construct_uri(rpc->uri);
213 rpc->base = base;
214 rpc->cb = cb;
215 rpc->cb_arg = cb_arg;
217 TAILQ_INSERT_TAIL(&base->registered_rpcs, rpc, next);
222 rpc);
233 struct evrpc *rpc;
235 /* find the right rpc; linear search might be slow */
236 TAILQ_FOREACH(rpc, &base->registered_rpcs, next) {
237 if (strcmp(rpc->uri, name) == 0)
240 if (rpc == NULL) {
241 /* We did not find an RPC with this name */
244 TAILQ_REMOVE(&base->registered_rpcs, rpc, next);
246 free((char *)rpc->uri);
247 free(rpc);
261 struct evrpc *rpc = arg;
274 if (evrpc_process_hooks(&rpc->base->input_hooks,
283 rpc_state->request = rpc->request_new();
287 rpc_state->rpc = rpc;
289 if (rpc->request_unmarshal(
297 rpc_state->reply = rpc->reply_new();
304 /* give the rpc to the user; they can deal with it */
305 rpc->cb(rpc_state, rpc->cb_arg);
320 struct evrpc *rpc = rpc_state->rpc;
323 rpc->request_free(rpc_state->request);
325 rpc->reply_free(rpc_state->reply);
334 struct evrpc *rpc = rpc_state->rpc;
337 if (rpc->reply_complete(rpc_state->reply) == -1) {
348 rpc->reply_marshal(data, rpc_state->reply);
351 if (evrpc_process_hooks(&rpc->base->output_hooks,
377 /* Client implementation of RPC site */
438 * Add a connection to the RPC pool. A request scheduled on the pool
537 * a timeout after which the whole rpc is going to be aborted.
567 /* initialize the event structure for this rpc */
577 * the next time a connection is empty, the rpc will be send on that.