/* number of bad pieces they've contributed to */
uint8_t strikes;
- uint8_t encryption_preference;
-
/* how many requests the peer has made that we haven't responded to yet */
int pendingReqsToClient;
int pendingReqsToPeer;
struct tr_peerIo * io;
+
+ /* Hook to private peer-mgr information */
struct peer_atom * atom;
/** how complete the peer's copy of the torrent is. [0.0...1.0] */
struct tr_peerIo;
struct tr_peermsgs;
-enum
-{
- ENCRYPTION_PREFERENCE_UNKNOWN,
- ENCRYPTION_PREFERENCE_YES,
- ENCRYPTION_PREFERENCE_NO
-};
-
/* opaque forward declaration */
struct peer_atom;
AWAITING_BT_PIECE
};
+typedef enum
+{
+ ENCRYPTION_PREFERENCE_UNKNOWN,
+ ENCRYPTION_PREFERENCE_YES,
+ ENCRYPTION_PREFERENCE_NO
+}
+encryption_preference_t;
+
+
+
/**
***
**/
tr_port dht_port;
- size_t metadata_size_hint;
+ encryption_preference_t encryption_preference;
+
+ size_t metadata_size_hint;
#if 0
size_t fastsetSize;
tr_piece_index_t fastset[MAX_FAST_SET_SIZE];
/* does the peer prefer encrypted connections? */
if (tr_variantDictFindInt (&val, TR_KEY_e, &i)) {
- msgs->peer->encryption_preference = i ? ENCRYPTION_PREFERENCE_YES
- : ENCRYPTION_PREFERENCE_NO;
+ msgs->encryption_preference = i ? ENCRYPTION_PREFERENCE_YES
+ : ENCRYPTION_PREFERENCE_NO;
if (i)
pex.flags |= ADDED_F_ENCRYPTION_FLAG;
}