aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/half_edge_st.h
blob: d4617be1083a3a48aad4199b7953bde68b644fdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Copyright (c) 2001 Matej Pfajfar.
 * Copyright (c) 2001-2004, Roger Dingledine.
 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
 * Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */

#ifndef HALF_EDGE_ST_H
#define HALF_EDGE_ST_H

#include "core/or/or.h"

/**
 * Struct to track a connection that we closed that the other end
 * still thinks is open. Exists in origin_circuit_t.half_streams until
 * we get an end cell or a resolved cell for this stream id.
 */
typedef struct half_edge_t {
  /** stream_id for the half-closed connection */
  streamid_t stream_id;

  /** How many sendme's can the other end still send, based on how
   * much data we had sent at the time of close */
  int sendmes_pending;

  /** How much more data can the other end still send, based on
   * our deliver window */
  int data_pending;

  /** Is there a connected cell pending? */
  int connected_pending : 1;
} half_edge_t;

#endif