(trunk libT) #117 "UDP tracker protocol support (BEP #15)" -- refactor announcer.c so that alternate tracker protocols can be supported.

This commit adds a set of package-visible structs and functions to allow delegating announces and scrapes to different protocol handlers. (Examples: struct tr_announce_request, struct tr_announce_response, struct tr_scrape_request, struct tr_scrape_response.) HTTP is the only protocol handler currently implemented; however, this provides a clean API for other protocol handlers, and having this in trunk will help shake out any bugs in this refactoring.

In addition, logging via the TR_DEBUG_FD environment variable is vastly improved in the announcer module now.
This commit is contained in:
Jordan Lee
2011-03-11 04:19:01 +00:00
parent e45a6dabc9
commit b46d3a2713
9 changed files with 1207 additions and 687 deletions

View File

@@ -69,6 +69,8 @@ void tr_webRunWithBuffer( tr_session * session,
void tr_http_escape( struct evbuffer *out, const char *str, int len, tr_bool escape_slashes );
void tr_http_escape_sha1( char * out, const uint8_t * sha1_digest );
char* tr_http_unescape( const char * str, int len );
#ifdef __cplusplus