Menu

#11 Edonkey server port

Win32-GUI
open
Features (34)
6
2002-05-21
2002-05-21
No

It is pretty important to let the information about
the server port be included on the sig.

Discussion

  • Esben Jensen

    Esben Jensen - 2002-05-21
    • milestone: 206757 --> Win32-GUI
     
  • rtf

    rtf - 2002-05-25

    Logged In: YES
    user_id=550684

    vm dumps ALL servers the donkey knows to the console. the port is
    included... I'm not so sure if it is a good idea to dump 400-800 servers to the
    console each time the sig is updated. we should probably implement the
    upload on demand (ie server change) first and use that. if the servers have
    to be loaded anyway I could dump them to html as well ;)

    -rtf

     
  • Esben Jensen

    Esben Jensen - 2002-05-25

    Logged In: YES
    user_id=544193

    I have thought of many solutions to this problem.

    I think the users will be pissed off when their console is spamming 800
    servers :)

    Also the edit control doesn't seem to be able to hold all the output.

    Checking the server.met file won't do either, because it only gets saved
    when Edonkey exits.

    The best solution I have thought of for now, is to use netstat to look up
    the information. If this can be done without a DOS-prompt opening up, I
    think it is a reasonable solution, but it might not be easily portable.

     
  • rtf

    rtf - 2002-05-25

    Logged In: YES
    user_id=550684

    what is netstat? and using the server.met to get some of the ports would
    be better than nothing. people who download server.met before starting
    the donkey would have most ports then - at least in the beginning ;)

     
  • Esben Jensen

    Esben Jensen - 2002-05-25

    Logged In: YES
    user_id=544193

    netstat is a command line tool that reports all current connections with
    IP and port. When lookin up a server IP in the output it seems we can
    get a pretty reliable port. But I'm not sure if that tool is part of a normal
    XP or 2000 installation, or if the output is the same - you tell me.

    You're right getting a port some of the time is better than not getting it at
    all. If the netstat solution isn't viable we can use the server.met or
    perhaps a combination of both.

     
  • rtf

    rtf - 2002-05-25

    Logged In: YES
    user_id=550684

    it's part of xp and works fine. parsing the output should be pretty easy too.
    hiding its use from the user could be tricky though... :)

     
  • dra.:.god

    dra.:.god - 2002-05-26

    Logged In: YES
    user_id=553457

    Searching in the server.met is posible. i have found an
    program that check the servers from the server met and
    rebuilt it... it is written in c but there is the source in it the
    server met loading is done...

    http://users.aber.ac.uk/tpm01/ed2k_tools/ed2k_slist.html

    this can be used to write an phars routine for delphi that give
    the programm the abiliti to get the port... and other infos...

    dra.:.god

     
  • John Brookes

    John Brookes - 2002-08-02

    Logged In: YES
    user_id=518202

    The netstat option is viable.

    I've got Delphi code to use the windows DLL version of it to
    pull the information straight into Delphi (a TList I believe, but I
    could be wrong, it's been a while since I used it)....

    Then you can just go through each item in the list searching
    for the IP you got from eDonkey. Store that record in an
    array and pull the remote port.

    The code works well, although I'll have to hunt it out. I used it
    on a Netmeeting Call Monitor I wrote a coupla years ago
    (basically to try and hunt down the users calling you in
    Netmeeting through IRC, show you the IP of people calling
    you in case you get disconnected and need to call them
    back, etc.. essentially the Netmeeting equivalent of caller ID).

    So yeah, the netstat Delphi source works well, so I'll hunt it
    out for ya.

     
  • Esben Jensen

    Esben Jensen - 2002-08-02

    Logged In: YES
    user_id=544193

    In my local development version I've implemented the Netstat
    solution by using the command line application, and
    redirecting its output to Delphi. It works fine.

    But using a dll for it would be much easier and more elegant.

    If you can find a reference for that dll in the Windows SDK or
    whatever that would be great.

     
  • John Brookes

    John Brookes - 2002-08-02

    Logged In: YES
    user_id=518202

    Soon as I find the netstat code, I'll let you know. As far as
    I'm aware it's GPL. If not, it'll give you a good enough
    understanding of the API for netstat that something could be
    written from scratch :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.