diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-10-17 14:23:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-10-18 10:53:12 -0400 |
commit | 35df48b189f513a456c90b5418ddab027079d507 (patch) | |
tree | 462e6a2393f5f7d25061b6fca5ec8fe71eae14ee /src/or/channel.c | |
parent | 6e823a27f114523c566b99a4deb3900764570954 (diff) | |
download | tor-35df48b189f513a456c90b5418ddab027079d507.tar.gz tor-35df48b189f513a456c90b5418ddab027079d507.zip |
Module docs for channel.c and channeltls.c
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index 6a78b21988..f547aea1b3 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -8,6 +8,32 @@ * transfer cells from Tor instance to Tor instance. * Currently, there is only one implementation of the channel abstraction: in * channeltls.c. + * + * Channels are a higher-level abstraction than or_connection_t: In general, + * any means that two Tor relays use to exchange cells, or any means that a + * relay and a client use to exchange cells, is a channel. + * + * Channels differ from pluggable transports in that they do not wrap an + * underlying protocol over which cells are transmitted: they <em>are</em> the + * underlying protocol. + * + * This module defines the generic parts of the channel_t interface, and + * provides the machinery necessary for specialized implementations to be + * created. At present, there is one specialized implementation in + * channeltls.c, which uses connection_or.c to send cells over a TLS + * connection. + * + * Every channel implementation is responsible for being able to transmit + * cells that are added to it with channel_write_cell() and related functions, + * and to receive incoming cells with the channel_queue_cell() and related + * functions. See the channel_t documentation for more information. + * + * When new cells arrive on a channel, they are passed to cell handler + * functions, which can be set by channel_set_cell_handlers() + * functions. (Tor's cell handlers are in command.c.) + * + * Tor flushes cells to channels from relay.c in + * channel_flush_from_first_active_circuit(). **/ /* |