swarm/network/stream: add Client.Close() (#229)

This commit is contained in:
Janos Guljas 2018-02-02 10:49:08 +01:00
parent f568ef178e
commit 5b19c2273f
2 changed files with 4 additions and 0 deletions

View file

@ -298,6 +298,7 @@ type client struct {
type Client interface {
NeedData([]byte) func()
BatchDone(string, uint64, []byte, []byte) func() (*TakeoverProof, error)
Close()
}
// nextBatch adjusts the indexes by inspecting the intervals
@ -344,6 +345,7 @@ func (c *client) batchDone(p *Peer, req *OfferedHashesMsg, hashes []byte) error
func (c *client) close() {
close(c.next)
c.Close()
}
// Spec is the spec of the streamer protocol

View file

@ -253,3 +253,5 @@ func (s *SwarmSyncerClient) TakeoverProof(streamName string, from uint64, hashes
Sig: nil,
}, nil
}
func (s *SwarmSyncerClient) Close() {}