summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorMatthew Finkel <matthew.finkel@gmail.com>2012-08-02 16:15:23 -0400
committerMatthew Finkel <matthew.finkel@gmail.com>2012-08-02 16:15:23 -0400
commitb50eb14bbf4da25ef43efe91851b239a04383c8e (patch)
treeea0746f7cf3b3e029ad5c290cdbec5b7cb166281 /src/or/connection.c
parent65d8448209633cb5f8f7804c309f537e8ac4b803 (diff)
downloadtor-b50eb14bbf4da25ef43efe91851b239a04383c8e.tar.gz
tor-b50eb14bbf4da25ef43efe91851b239a04383c8e.zip
Updated docs for new connections.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 2520c54ce8..a1d5354eb5 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -239,7 +239,16 @@ dir_connection_new(int socket_family)
}
/** Allocate and return a new or_connection_t, initialized as by
- * connection_init(). */
+ * connection_init().
+ *
+ * Set timestamp_last_added_nonpadding to now.
+ *
+ * Assign a pseudorandom next_circ_id between 0 and 2**15.
+ *
+ * Initialize active_circuit_pqueue.
+ *
+ * Set active_circuit_pqueue_last_recalibrated to current cell_ewma tick.
+ */
or_connection_t *
or_connection_new(int socket_family)
{
@@ -257,7 +266,10 @@ or_connection_new(int socket_family)
}
/** Allocate and return a new entry_connection_t, initialized as by
- * connection_init(). */
+ * connection_init().
+ *
+ * Allocate space to store the socks_request.
+ */
entry_connection_t *
entry_connection_new(int type, int socket_family)
{
@@ -339,14 +351,11 @@ connection_new(int type, int socket_family)
/** Initializes conn. (you must call connection_add() to link it into the main
* array).
*
+ * Set conn-\>magic to the correct value.
+ *
* Set conn-\>type to <b>type</b>. Set conn-\>s and conn-\>conn_array_index to
* -1 to signify they are not yet assigned.
*
- * If conn is not a listener type, allocate buffers for it. If it's
- * an AP type, allocate space to store the socks_request.
- *
- * Assign a pseudorandom next_circ_id between 0 and 2**15.
- *
* Initialize conn's timestamps to now.
*/
static void