Remove some unused code

This commit is contained in:
Matt Joiner 2020-10-27 17:56:55 +11:00
parent 8e1a8440bf
commit 845d3fbe8f
2 changed files with 0 additions and 18 deletions

View File

@ -209,10 +209,6 @@ func (cn *PeerConn) locker() *lockWithDeferreds {
return cn.t.cl.locker()
}
func (cn *PeerConn) localAddr() net.Addr {
return cn.conn.LocalAddr()
}
func (cn *peer) supportsExtension(ext pp.ExtensionName) bool {
_, ok := cn.PeerExtensionIDs[ext]
return ok

View File

@ -73,20 +73,6 @@ func (r *reader) SetReadahead(readahead int64) {
r.posChanged()
}
func (r *reader) readable(off int64) (ret bool) {
if r.t.closed.IsSet() {
return true
}
req, ok := r.t.offsetRequest(r.torrentOffset(off))
if !ok {
panic(off)
}
if r.responsive {
return r.t.haveChunk(req)
}
return r.t.pieceComplete(pieceIndex(req.Index))
}
// How many bytes are available to read. Max is the most we could require.
func (r *reader) available(off, max int64) (ret int64) {
off += r.offset