omashpolskiy.bt-core.1.6.source-code.tracker_response.yml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bt-core Show documentation
Show all versions of bt-core Show documentation
BitTorrent Client Library (Core)
--- # schema of a tracker response document
- model:
type: dictionary
exclusives:
# TODO: some trackers return failure reason together with interval and peers,
# which causes the validation to fail -- need to do something about it
# - "failure reason"
# - ["warning message", interval, "min interval", "tracker id", complete, incomplete, peers]
entries:
- {key: "failure reason", type: string, required: false}
# the following two properties (interval and peers) are in fact required, when failure reason is not present;
# but the model doesn't support conditional properties yet, so marking them as optional,
# and relying on the parser to enforce BEP-3 rules
- {key: interval, type: integer, required: false}
- {key: peers, type: string, required: false}
- {key: "warning message", type: string, required: false}
- {key: "min interval", type: integer, required: false}
- {key: "tracker id", type: string, required: false}
- {key: complete, type: integer, required: false}
- {key: incomplete, type: integer, required: false}
- {key: crypto_flags, type: string, required: false}