aboutsummaryrefslogtreecommitdiff
path: root/peer/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'peer/peer.go')
-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