diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-07-28 15:11:20 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-07-28 15:11:20 +0000 |
commit | 85f381153ba6a3c87e3e43e2640b313c27d9b2ff (patch) | |
tree | 46959266a23814748b6e4c7d18c811d10639ff26 /src/or/or.h | |
parent | 6dc13cdbeb184fb906e50e79346e684d83a49eb5 (diff) | |
download | tor-85f381153ba6a3c87e3e43e2640b313c27d9b2ff.tar.gz tor-85f381153ba6a3c87e3e43e2640b313c27d9b2ff.zip |
r6949@Kushana: nickm | 2006-07-28 10:17:38 -0400
Shave another 8 bytes from connection_t: turn inbuf_reached_eof into a bit, and lower timestamp_lastempty to or_connection_t
svn:r6934
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/or/or.h b/src/or/or.h index 667ed1a2fb..d05475617c 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -606,7 +606,7 @@ typedef struct connection_t { uint8_t type; /**< What kind of connection is this? */ uint8_t state; /**< Current state of this connection. */ - uint8_t purpose; /**< Only used for DIR and EXIT types currently. !!! */ + uint8_t purpose; /**< Only used for DIR and EXIT types currently. */ unsigned wants_to_read:1; /**< Boolean: should we start reading again once * the bandwidth throttler allows it? */ unsigned wants_to_write:1; /**< Boolean: should we start writing again once @@ -614,40 +614,32 @@ typedef struct connection_t { unsigned hold_open_until_flushed:1; /**< Despite this connection's being * marked for close, do we flush it * before closing it? */ - unsigned edge_has_sent_end:1; /**< For debugging; only used on edge * connections. Set once we've set the stream end, * and check in circuit_about_to_close_connection(). */ /** For control connections only. If set, we send extended info with control - * events as appropriate. !!!! */ + * events as appropriate. */ unsigned int control_events_are_extended:1; /** Used for OR conns that shouldn't get any new circs attached to them. !!*/ unsigned int or_is_obsolete:1; /** For AP connections only. If 1, and we fail to reach the chosen exit, - * stop requiring it. !!! */ + * stop requiring it. */ unsigned int chosen_exit_optional:1; + int inbuf_reached_eof:1; /**< Boolean: did read() return 0 on this conn? */ int s; /**< Our socket; -1 if this connection is closed. */ int conn_array_index; /**< Index into the global connection array. */ struct event *read_event; /**< Libevent event structure. */ struct event *write_event; /**< Libevent event structure. */ buf_t *inbuf; /**< Buffer holding data read over this connection. */ - int inbuf_reached_eof; /**< Boolean: did read() return 0 on this conn? - * (!!!bitfield?) - */ - time_t timestamp_lastread; /**< When was the last time libevent said we could - * read? */ - buf_t *outbuf; /**< Buffer holding data to write over this connection. */ size_t outbuf_flushlen; /**< How much data should we try to flush from the * outbuf? */ + time_t timestamp_lastread; /**< When was the last time libevent said we could + * read? */ time_t timestamp_lastwritten; /**< When was the last time libevent said we * could write? */ - time_t timestamp_created; /**< When was this connection_t created? */ - time_t timestamp_lastempty; /**< When was the outbuf last completely empty? - * !!!! - */ uint32_t addr; /**< IP of the other side of the connection; used to identify * routers, along with port. */ @@ -675,6 +667,8 @@ typedef struct or_connection_t { tor_tls_t *tls; /**< TLS connection state */ + time_t timestamp_lastempty; /**< When was the outbuf last completely empty?*/ + /* bandwidth* and receiver_bucket only used by ORs in OPEN state: */ int bandwidthrate; /**< Bytes/s added to the bucket. (OPEN ORs only.) */ int bandwidthburst; /**< Max bucket size for this conn. (OPEN ORs only.) */ |