Changeset 1058 for trunk/libtorrent/src/protocol/peer_connection_leech.h
- Timestamp:
- 05/05/08 15:16:26 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtorrent/src/protocol/peer_connection_leech.h
r1043 r1058 44 44 namespace torrent { 45 45 46 // Type-specific data. 47 template<Download::ConnectionType type> struct PeerConnectionData; 48 49 template<> struct PeerConnectionData<Download::CONNECTION_LEECH> { }; 50 51 template<> struct PeerConnectionData<Download::CONNECTION_SEED> { }; 52 53 template<> struct PeerConnectionData<Download::CONNECTION_INITIAL_SEED> { 54 PeerConnectionData() : lastIndex(~uint32_t()) { } 55 uint32_t lastIndex; 56 uint32_t bytesLeft; 57 }; 58 46 59 template<Download::ConnectionType type> 47 60 class PeerConnection : public PeerConnectionBase { … … 60 73 void read_have_chunk(uint32_t index); 61 74 75 void offer_chunk(); 76 bool should_upload(); 77 62 78 inline void fill_write_buffer(); 79 80 PeerConnectionData<type> m_data; 63 81 }; 64 82
