source: branches/encryption/libtransmission/peer-mgr-private.h @ 2978

Last change on this file since 2978 was 2978, checked in by charles, 15 years ago

still way too buggy, but I can now seed at full speed using < 2% of the CPU. =)

  • Property svn:keywords set to Date Rev Author Id
File size: 1.2 KB
Line 
1/*
2 * This file Copyright (C) 2007 Charles Kerr <charles@rebelbase.com>
3 *
4 * This file is licensed by the GPL version 2.  Works owned by the
5 * Transmission project are granted a special exemption to clause 2(b)
6 * so that the bulk of its code can remain under the MIT license.
7 * This exemption does not extend to derived works not owned by
8 * the Transmission project.
9 *
10 * $Id: peer-mgr-private.h 2978 2007-09-06 00:33:33Z charles $
11 */
12
13#ifndef TR_PEER_MGR_PRIVATE_H
14#define TR_PEER_MGR_PRIVATE_H
15
16#include <inttypes.h> /* uint16_t */
17#include <arpa/inet.h> /* struct in_addr */
18
19struct tr_bitfield;
20struct tr_peerIo;
21struct tr_peermsgs;
22
23typedef struct tr_peer
24{
25    struct in_addr in_addr;
26    uint16_t port;
27    struct tr_peerIo * io;
28    int from;
29
30    struct tr_bitfield * banned;
31    struct tr_bitfield * blame;
32    struct tr_bitfield * have;
33    float progress;
34
35    /* the client name from the `v' string in LTEP's handshake dictionary */
36    char * client;
37
38    uint64_t lastPexTime;
39
40    unsigned int  pexEnabled : 1;
41    unsigned int  peerIsChoked : 1;
42    unsigned int  peerIsInterested : 1;
43    unsigned int  clientIsChoked : 1;
44    unsigned int  clientIsInterested : 1;
45
46    struct tr_peermsgs * msgs;
47
48    struct tr_pex * lastPex;
49    int lastPexCount;
50}
51tr_peer;
52
53#endif
Note: See TracBrowser for help on using the repository browser.