o use libevent's internal timercmp on all platforms, to avoid bugs on old platforms where timercmp(a,b,<=) is buggy.
o Remove the never-exported, never-used evhttp_hostportfile function.
o Support input/output filters for bufferevents; somewhat similar to libio's model. This will allow us to implement SSL, compression, etc, transparently to users of bufferevents such as the http layer.
+ o allow connections to be removed from an rpc pool
Changes in 1.4.0:
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
void
evrpc_pool_add_connection(struct evrpc_pool *pool,
- struct evhttp_connection *connection) {
+ struct evhttp_connection *connection)
+{
assert(connection->http_server == NULL);
TAILQ_INSERT_TAIL(&pool->connections, connection, next);
}
}
+void
+evrpc_pool_remove_connection(struct evrpc_pool *pool,
+ struct evhttp_connection *connection)
+{
+ TAILQ_REMOVE(&pool->connections, connection, next);
+}
+
void
evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs)
{
* @see evrpc_pool_new()
*/
void evrpc_pool_free(struct evrpc_pool *pool);
-/*
- * adds a connection over which rpc can be dispatched. the connection
- * object must have been newly created.
+
+/**
+ * Adds a connection over which rpc can be dispatched to the pool.
+ *
+ * The connection object must have been newly created.
+ *
+ * @param pool the pool to which to add the connection
+ * @param evcon the connection to add to the pool.
+ */
+void evrpc_pool_add_connection(struct evrpc_pool *pool,
+ struct evhttp_connection *evcon);
+
+/**
+ * Removes a connection from the pool.
+ *
+ * The connection object must have been newly created.
+ *
+ * @param pool the pool from which to remove the connection
+ * @param evcon the connection to remove from the pool.
*/
-void evrpc_pool_add_connection(struct evrpc_pool *,
- struct evhttp_connection *);
+void evrpc_pool_remove_connection(struct evrpc_pool *pool,
+ struct evhttp_connection *evcon);
/**
* Sets the timeout in secs after which a request has to complete. The