You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
343 B

11 years ago
  1. package peer
  2. /* Filter
  3. A Filter could be a bloom filter for lossy filtering, or could be a lossless filter.
  4. Either way, it's used to keep track of what a peer knows of.
  5. */
  6. type Filter interface {
  7. Binary
  8. Add(Msg)
  9. Has(Msg) bool
  10. // Loads a new filter.
  11. // Convenience factory method
  12. Load(ByteSlice) Filter
  13. }