Add a bunch of TODOs

This commit is contained in:
Matt Joiner 2018-02-13 11:18:23 +11:00
parent 7dec0a196d
commit 0af2aaf85f
3 changed files with 6 additions and 1 deletions

View File

@ -78,7 +78,8 @@ func setAnnounceParams(_url *url.URL, ar *AnnounceRequest) {
}
// http://stackoverflow.com/questions/17418004/why-does-tracker-server-not-understand-my-request-bittorrent-protocol
q.Set("compact", "1")
// According to https://wiki.vuze.com/w/Message_Stream_Encryption.
// According to https://wiki.vuze.com/w/Message_Stream_Encryption. TODO:
// Take EncryptionPolicy or something like it as a parameter.
q.Set("supportcrypto", "1")
_url.RawQuery = q.Encode()

View File

@ -47,6 +47,8 @@ var (
ErrBadScheme = errors.New("unknown scheme")
)
// TODO: Just split udp/http announcing completely, to support various different options they have.
func Announce(cl *http.Client, userAgent string, urlStr string, req *AnnounceRequest) (res AnnounceResponse, err error) {
return AnnounceHost(cl, userAgent, urlStr, req, "")
}

View File

@ -257,6 +257,8 @@ func (c *udpAnnounce) connect() (err error) {
return
}
// TODO: Split on IPv6, as BEP 15 says response peer decoding depends on
// network in use.
func announceUDP(ar *AnnounceRequest, _url *url.URL) (AnnounceResponse, error) {
ua := udpAnnounce{
url: *_url,