Nixers project: Bittorrent library - Community & Forums Related Discussions
Users browsing this thread: 20 Guest(s)
|
|||
xkco: you rock!
Venam started to make structs to hold the metainfo. That is a good idea I think, as it will help us work on multiple parts of the code independently and merge everything easily. Here is the proposition: if we need to have an array of complex items, use a struct. Otherwise just use variables. We can have multiple torrents per process and do not know how many of them. I think we need a 'torrent' struct (torrent[i]->data). Some torrents can have multiple files, struct as well (files[i]->path). Code: struct file { Code: struct torrent { If there is only announce on the metainfo file, the 'announce_list' would only hold the first (prefered) url of tracker: Code: torrent->announce_list = { "http://tracker-1.tld", NULL } I do not see the need to separate metainfo from the actual data. We could do a 'part' struct as well, to avoid implementing a bitmask, and for convenience. |
|||