Results 1 to 7 of 7

Thread: .NET library for Utorrent

  1. #1
    Join Date
    Mar 2010
    Posts
    330

    .NET library for Utorrent

    Hello,
    I am a .net programmer and I would like to design a torrent client. I am searching a .net library for utorrent. If any one has done this before then please let me know. Also, if you have some code for me then please post it. Thank you.

  2. #2
    Join Date
    Apr 2008
    Posts
    264

    Re: .NET library for Utorrent

    Hey,
    Check out this code
    Code:
     Function torrentkey(ByVal length As Integer, Optional ByVal kys As Integer = 1) As String
     
            Dim Chars() As String = {"some string here"}
            'Chars[0] = utorr kys
            'Chars[1] = bittorr kys
            Dim str As String = ""
            Dim r As New System.Random()
     
            For i = 1 To length
                str &= Chars(kys).Substring(r.Next(1, Chars(kys).Length), 1)
            Next
     
            Return str

  3. #3
    Join Date
    Nov 2009
    Posts
    359

    Re: .NET library for Utorrent

    If you need you can use this part of the code

    Code:
      Function AnnounceGetPeerList(ByVal fs As str) As List(Of Peer)
            'you can also use a file with a torrenrequest
            'Dim reader As New RawReader(IO.File.Open("test.req", IO.FileMode.Open), False)
     
            'decode the bencoded str
            Dim dictionary As encddic = BEncodedValue.Decode(Of encddic)(fs)
     
            Dim prs As New List(Of Peer)
            For Each kypr In dictionary
                Select Case kypr.Key.ToString
                    Case "interval"
                        'MsgBox TimeSpan.FromSeconds(int.Parse(kypr.Value.ToString())); 
                        'MsgBox(kypr.Value.ToString)
                    Case "prs"
                        If TypeOf kypr.Value Is BEncodedList Then
                            prs.AddRange(Peer.Decode(DirectCast(kypr.Value, BEncodedList)))
                        ElseIf TypeOf kypr.Value Is BEncodedString Then
                            prs.AddRange(Peer.Decode(DirectCast(kypr.Value, BEncodedString)))
                        End If
                    Case Else
                        'MsgBox("HttpTracker - Unknown announce tag received:" & kypr.Key.ToString() & kypr.Value.ToString())
                End Select
            Next
     
            Return prs
        End Function

  4. #4
    Join Date
    Mar 2010
    Posts
    338

    Re: .NET library for Utorrent

    Transmission is increasingly recognized as my default client. Instead, I want to open with torrent Opera. But I have never installed Opera (it was of me in a reforge installing other software (update Transmission?) And I had not seen), and therefore I can not uninstall it (it is not in my Applications folder). And when I mean transmission default client to open the files. Torrent, not my mac "remembers" never.

  5. #5
    Join Date
    May 2008
    Posts
    248

    Re: .NET library for Utorrent

    To know or is Opera, just open a stream with (right click> Open With) and when it starts, make apple + click (cmd-click for those who no longer have the apple) on the Opera icon in the Dock. cmd + click on a Dock icon displays the application in the Finder. And to know where you are, or you switch to column, or you do a cmd + click on the title of the Finder window.

  6. #6
    Join Date
    Mar 2010
    Posts
    303

    Re: .NET library for Utorrent

    So I have done like this:
    Right click on a torrent file and then "Get Info" (I MAC OSX English) and then down you can choose from a list what you want the program opens and you pick Transmission then you click on "by default" and voila! problem solved!

  7. #7
    Join Date
    Mar 2010
    Posts
    372

    Re: .NET library for Utorrent

    You can stay with transmission, but you will have the same problem => download slower than normal.In fact, the principle of open ports, serves to connect you to more peers and thus download more quickly. It's the same thing on emule for example, must open TCP port. Now, some ports open box automatically (UPnP). Soon to be that yours does.

Similar Threads

  1. Replies: 3
    Last Post: 26-03-2012, 03:25 PM
  2. Replies: 6
    Last Post: 03-07-2011, 10:20 PM
  3. Replies: 4
    Last Post: 13-04-2011, 10:35 AM
  4. Replies: 4
    Last Post: 28-12-2010, 08:38 AM
  5. New .NET wrapper library for the uTorrent
    By Bindu-I in forum Technology & Internet
    Replies: 9
    Last Post: 10-07-2010, 08:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,672,795.35075 seconds with 17 queries