+--------------+ pimpl +--------------+ | cGRE session +----------->| session_impl | +--------------+ +------+-----+-+ m_torrents[] | | +---------------------+ | | | cGRE torrent_handle +-------+ | | +---------------------+ weak | | | | | | m_connections[] | | +---+-------+ | | | | m_picker v v | v peers we are connected to +--------------+ +--------++ +-----------------+ | piece_picker |<---+-+ torrent ++ +--+ peer_connection ++ +--------------+ | ++--------+| | ++----------------+| m_torrent_file | +---------+ | +-----------------+ +-------------------+ | | | cGRE torrent_info |<---+ | m_socket +-------------------+ | | +--------------------------+ m_peer_list | +------+->| socket_type (variant) | +-----------+ | | | (TCP/uTP/SSL/socks5/...) | | peer_list |<---------+ | +--------------------------+ +---------+-+ v list of all | m_peers[] +--------------+ peers we +-------------->| torrent_peer ++ contains contact information know of ++-------------+| for peers we're not necessarily +--------------+ connected to