Add some extra char flags to connection status
This commit is contained in:
parent
2ef602cabd
commit
5f9ed81917
|
@ -66,11 +66,20 @@ func (cn *connection) WriteStatus(w io.Writer) {
|
|||
fmt.Fprintf(w, "%c", b)
|
||||
}
|
||||
// https://trac.transmissionbt.com/wiki/PeerStatusText
|
||||
if cn.PeerInterested && !cn.Choked {
|
||||
c('O')
|
||||
}
|
||||
if len(cn.Requests) != 0 {
|
||||
c('D')
|
||||
} else if cn.Interested {
|
||||
}
|
||||
if cn.PeerChoked && cn.Interested {
|
||||
c('d')
|
||||
}
|
||||
if !cn.Choked && cn.PeerInterested {
|
||||
c('U')
|
||||
} else {
|
||||
c('u')
|
||||
}
|
||||
if !cn.PeerChoked && !cn.Interested {
|
||||
c('K')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue