half_edge_st.h 976 B

12345678910111213141516171819202122232425262728293031323334
  1. /* Copyright (c) 2001 Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2019, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef HALF_EDGE_ST_H
  7. #define HALF_EDGE_ST_H
  8. #include "core/or/or.h"
  9. /**
  10. * Struct to track a connection that we closed that the other end
  11. * still thinks is open. Exists in origin_circuit_t.half_streams until
  12. * we get an end cell or a resolved cell for this stream id.
  13. */
  14. typedef struct half_edge_t {
  15. /** stream_id for the half-closed connection */
  16. streamid_t stream_id;
  17. /** How many sendme's can the other end still send, based on how
  18. * much data we had sent at the time of close */
  19. int sendmes_pending;
  20. /** How much more data can the other end still send, based on
  21. * our deliver window */
  22. int data_pending;
  23. /** Is there a connected cell pending? */
  24. int connected_pending : 1;
  25. } half_edge_t;
  26. #endif