C version of gtorrent