aboutsummaryrefslogtreecommitdiff
path: root/peer
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-07-13 13:21:23 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-07-13 13:21:23 +0200
commita4da4471b203a03fb01374716bdc06f794d8b73d (patch)
treed4cea82d13d772dccf4bd922b0a97945bd07533a /peer
parenta76e4193ab052bae6a2885b41fdf6bac7644627f (diff)
Better names for flags
Diffstat (limited to 'peer')
-rw-r--r--peer/peer.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/peer/peer.go b/peer/peer.go
index c3e1577..b4d3d38 100644
--- a/peer/peer.go
+++ b/peer/peer.go
@@ -15,15 +15,18 @@ const (
Failed
)
+type Flags struct {
+ UnChocked bool
+ Interested bool
+}
+
type Peer struct {
conn net.Conn
Addr *net.TCPAddr
ID []byte
Valid bool
- UnChoked bool // remote
- Interested bool // remote
- UnChoking bool // local
- Intersting bool // local
+ Local Flags
+ Remote Flags
Optimistic bool
buf *bytes.Buffer
bitField bitfield.BitField