Thursday, June 07, 2007
BitTorrent : I was developing a library based on BitTorrent to study about the implementation of P2P networking before, but I stopped the development because I have no idea about the application which I want to create.
However I will restart the development project because I would like to create some useful applications which are based on P2P such as Joost.
I have added the current codes into the new project on SourceForge now. The following sample shows how to get the peers of the specified torrent using the current library.
However I will restart the development project because I would like to create some useful applications which are based on P2P such as Joost.
I have added the current codes into the new project on SourceForge now. The following sample shows how to get the peers of the specified torrent using the current library.
#include <cybergarage/bittorrent/cbittorrent.h>To compile the sample, you have to install the latest CyberLink for C from the SVN. Please use the following commands to check the simple sample if you want.
int main(int argc, char* argv[])
{
CgBittorrentMetainfo *cbm;
CgBittorrentTracker *cbt;
CgBittorrentPeer *cbp;
int n;
if (argc < 2) {
printf("Usage : printpeers <Torrent URL>\n");
return -1;
}
cbm = cg_bittorrent_metainfo_new();
if (cg_bittorrent_metainfo_fetch(cbm, argv[1]) == FALSE) {
printf("Couldn't get the specified torrent file <%s>\n", argv[1]);
return -1;
}
cbt = cg_bittorrent_tracker_new();
cg_bittorrent_tracker_load(
cbt ,
cbm,
(unsigned char *)CDIST_TEST_TRACKER_PEERID,
"",
CDIST_TEST_TRACKER_PORT,
CDIST_TEST_TRACKER_UPLOADED,
CDIST_TEST_TRACKER_DOWNLOADED,
CDIST_TEST_TRACKER_LEFT,
TRUE,
CG_BITTORRENT_TRACKER_EVENT_STARTED,
CDIST_TEST_TRACKER_NUMWANT
);
n = 0;
for (cbp = cg_bittorrent_tracker_getpeers(cbt); cbp; cbp = cg_bittorrent_peer_next(cbp)) {
n++;
printf("[%d] %s:%d\n",
n,
cg_bittorrent_peer_getaddress(cbp),
cg_bittorrent_peer_getport(cbp));
}
cg_bittorrent_tracker_delete(cbt);
cg_bittorrent_metainfo_delete(cbm);
return 0;
}
$ svn co https://cgbittorrent.svn.sourceforge.net/svnroot/cgbittorrent/trunkCurrently, there are many implementations based on Bittorrent. I will implement the basic functions about the BitTorrent specification at first, then I will develop the uniqueness.
$ cgbittorrent
$ cd cgbittorrent/
$ ./boostrap
$ ./configure
$ make
$ ./sample/printpeers/unix/printpeers http://torrent.fedoraproject.org/torrents/Zod-dvd-i386.torrent
[1] 80.xx3.x5x.x6:688x
[2] x4.x93.x03.8x:344x3
[3] x9x.x00.x5.x45:x88x
[4] x9.37.xxx.50:407
[5] 59.xx7.x70.x07:448xx
..........
[46] x43.88.x4.x40:x88x
[47] 85.8x.x59.x8x:x88x
[48] xx7.xx.x78.x7:x54xx
[49] 8x.8x.xx0.xx3:x7779
[50] x00.x0x.84.33:x88x
Comments:
<< Home
Hi Satoshi,
I was wondering if can have a look at the permision on the cyberlink java project on sourceforge because it looks that I can't do commit even if I am developer... My account on sourceforge.net is kismet-sl
BTW, I like to see that you continue to be involeved in Domtotics and also I'd like to your playing with WII :)
I was wondering if can have a look at the permision on the cyberlink java project on sourceforge because it looks that I can't do commit even if I am developer... My account on sourceforge.net is kismet-sl
BTW, I like to see that you continue to be involeved in Domtotics and also I'd like to your playing with WII :)
Hi Stefano,
Couldn't you commit into the SVN repository ?
Please tell me about your problem in more detail.
Couldn't you commit into the SVN repository ?
Please tell me about your problem in more detail.
Hi Satoshi,
I know, I'm out of contest, but I need a easy help about CyberX3D and I think this blog is the fastest way to contact you.
The issue is: can the latest version of CyberX3D load PROTO SFNode exposedField?
I can't load this simple VRML code:
-------------------------
PROTO Test [ exposedField SFNode geom NULL ]
{
Group { children [ Shape { geometry IS geom } ] }
}
DEF TestInstance Test { geom Box {} }
-------------------------
Thanks in advance!
Demis Corvaglia
HCI Lab (http://hcilab.uniud.it)
I know, I'm out of contest, but I need a easy help about CyberX3D and I think this blog is the fastest way to contact you.
The issue is: can the latest version of CyberX3D load PROTO SFNode exposedField?
I can't load this simple VRML code:
-------------------------
PROTO Test [ exposedField SFNode geom NULL ]
{
Group { children [ Shape { geometry IS geom } ] }
}
DEF TestInstance Test { geom Box {} }
-------------------------
Thanks in advance!
Demis Corvaglia
HCI Lab (http://hcilab.uniud.it)
Hi Satoshi,
I was able to commit, it was a problem on my local computer :)
I'm wondering if you can give an e-mail address to contact you...
Also I'd like to know if you can give me more right on CyberLink for Java project -> http://sourceforge.net/projects/cgupnpjava/
So that I can manage:
- Tracker
- Release
Because as you may have noticed from the SVN log I've worked on the library a lot and I'm think to release the version 1.8.0 of the upnp-stack.
What do you think?
Ciao,
Stefano "Kismet" Lenzi
I was able to commit, it was a problem on my local computer :)
I'm wondering if you can give an e-mail address to contact you...
Also I'd like to know if you can give me more right on CyberLink for Java project -> http://sourceforge.net/projects/cgupnpjava/
So that I can manage:
- Tracker
- Release
Because as you may have noticed from the SVN log I've worked on the library a lot and I'm think to release the version 1.8.0 of the upnp-stack.
What do you think?
Ciao,
Stefano "Kismet" Lenzi
Hi Stefano,
I checked the repository toda, but I think that it is a bit complex for me and other developers.
I will check the directories this week. I would like to rename the repository more simply.
Please tell me if you have any suggestions.
I checked the repository toda, but I think that it is a bit complex for me and other developers.
I will check the directories this week. I would like to rename the repository more simply.
Please tell me if you have any suggestions.
Hi Satoshi :)
It's nice to herd from you again ^_^
I think it's better if we continue our discussion on the CyberLink for Java Developer or Open Forum, do you agree?
Ciao,
Stefano "Kismet" Lenzi
It's nice to herd from you again ^_^
I think it's better if we continue our discussion on the CyberLink for Java Developer or Open Forum, do you agree?
Ciao,
Stefano "Kismet" Lenzi
Hi Satoshi,
There is some activity on the CyberLink for Java forum, I'm handling them.
But people start to ask for a new release... I don't have enough right to perform it, let me know if can do something for that :)
BTW, it would nice to herd from you more often :P
(I know everyone is busy! ^_^ )
There is some activity on the CyberLink for Java forum, I'm handling them.
But people start to ask for a new release... I don't have enough right to perform it, let me know if can do something for that :)
BTW, it would nice to herd from you more often :P
(I know everyone is busy! ^_^ )
Hi Satoshi,
I know, it not the correct place, but is there any new Version from CyberX3D. I found in the current Version many bugs. Like in NodeList. This "new" creates a memory leak !
Thanks in advance!
Christian
I know, it not the correct place, but is there any new Version from CyberX3D. I found in the current Version many bugs. Like in NodeList. This "new" creates a memory leak !
Thanks in advance!
Christian
Hi Christian,
I would like to fix the problems, please tell me about the bug in more detail.
Could you send the patch to me ?
Thanks for your advice :-)
Post a Comment
I would like to fix the problems, please tell me about the bug in more detail.
Could you send the patch to me ?
Thanks for your advice :-)
<< Home