Lines Matching refs:connection

504 static int evrpc_schedule_request(struct evhttp_connection *connection,
540 struct evhttp_connection *connection;
556 while ((connection = TAILQ_FIRST(&pool->connections)) != NULL) {
557 TAILQ_REMOVE(&pool->connections, connection, next);
558 evhttp_connection_free(connection);
575 * Add a connection to the RPC pool. A request scheduled on the pool
576 * may use any available connection.
581 struct evhttp_connection *connection)
583 EVUTIL_ASSERT(connection->http_server == NULL);
584 TAILQ_INSERT_TAIL(&pool->connections, connection, next);
587 * associate an event base with this connection
590 evhttp_connection_set_base(connection, pool->base);
593 * unless a timeout was specifically set for a connection,
594 * the connection inherits the timeout from the pool.
596 if (!evutil_timerisset(&connection->timeout))
597 evhttp_connection_set_timeout(connection, pool->timeout);
608 evrpc_schedule_request(connection, request);
614 struct evhttp_connection *connection)
616 TAILQ_REMOVE(&pool->connections, connection, next);
634 * Finds a connection object associated with the pool that is currently
640 struct evhttp_connection *connection;
641 TAILQ_FOREACH(connection, &pool->connections, next) {
642 if (TAILQ_FIRST(&connection->requests) == NULL)
643 return (connection);
659 evrpc_schedule_request(struct evhttp_connection *connection,
672 /* we need to know the connection that we might have to abort */
673 ctx->evcon = connection;
681 evrpc_hook_associate_meta_(&ctx->hook_meta, connection);
721 struct evhttp_connection *connection = ctx->evcon;
745 /* start the request over the connection */
746 res = evhttp_make_request(connection, req, EVHTTP_REQ_POST, uri);
811 * if no connection is available, we queue the request on the pool,
812 * the next time a connection is empty, the rpc will be send on that.