Official eMule-Board: Emule Sends Its Port Twice To Servers... - Official eMule-Board

Jump to content


Page 1 of 1

Emule Sends Its Port Twice To Servers... plus a failed connection question.

#1 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 27 August 2005 - 11:12 AM

in CServerConnect::ConnectionEstablished() eMule
sends a loginpacket to connect to the server, but
it writes the port to the packet twice (initial data + tag):

Quote

...
void CServerConnect::ConnectionEstablished() {
...
    // send loginpacket
    CSafeMemFile data(256);
    data.WriteHash16(thePrefs.GetUserHash());
    data.WriteUInt32(GetClientID());
    data.WriteUInt16(thePrefs.GetPort());

    uint32 tagcount = 5;
    data.WriteUInt32(tagcount);
    ...
    CTag tagPort(CT_PORT,thePrefs.GetPort());
    tagPort.WriteTagToFile(&data);

...
}
...

isn't that a little wasteful? can the tag be dropped?


btw, while we're at it, if the internet connection is down,
this class tries to reconnect, but i want to limit the attempts here:

Quote

...
CServerConnect::ConnectionFailed() {
...
  switch (sender->GetConnectionState()) {
    case CS_FATALERROR: {
      bool autoretry = !singleconnecting;
      StopConnectionTry();
      if ((thePrefs.Reconnect()) && (autoretry) && (!m_idRetryTimer)) {
        LogWarning(GetResString(IDS_RECONNECT), CS_RETRYCONNECTTIME);
        VERIFY( (m_idRetryTimer= SetTimer(NULL, 0, 1000*CS_RETRYCONNECTTIME, RetryConnectTimer)) != NULL );
        if (thePrefs.GetVerbose() && !m_idRetryTimer)
          DebugLogError(_T("Failed to create 'server connect retry' timer - %s"),GetErrorMessage(GetLastError()));
      }
      break;
    }
...
}
...

that way eMule will not try to reconnect if the internet is still down
(and won't connect) and eMule will not delete all the servers in the list.
is that the way or should i do this in another place (function/class)?

Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#2 User is offline   SlugFiller 

  • The one and only master slug
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 6988
  • Joined: 15-September 02

Posted 27 August 2005 - 09:33 PM

The issue is, if it stops reconnecting, how will it start again when the internet is back up? You can end up not connected while AFK(The very thing auto-reconnect tries to avoid).
What it should do is avoid marking dead servers this way, but keep on trying.
Why haven't you clicked yet?

SlugFiller rule #1: Unsolicited PMs is the second most efficient method to piss me off.
SlugFiller rule #2: The first most efficient method is unsolicited eMails.
SlugFiller rule #3: If it started in a thread, it should end in the same thread.
SlugFiller rule #4: There is absolutely no reason to perform the same discussion twice in parallel, especially if one side is done via PM.
SlugFiller rule #5: Does it say "Group: Moderators" under my name? No? Then stop telling me about who you want to ban! I really don't care! Go bother a moderator.
SlugFiller rule #6: I can understand English, Hebrew, and a bit of Japanese(standard) and Chinese(mandarin), but if you speak to me in anything but English, do expect to be utterly ignored, at best.
0

#3 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 28 August 2005 - 06:39 AM

for some reason (i don't know why) but when
the internet disconnects on my machine, it doesn't
reconnects back (it doesn't matter if i have adsl or cable)
so i'd rather have eMule stop trying after a few times.

if u still want eMule to try, u can add the condition:
if we've enabled the limit and the limit was reached (=0)
then try connecting every 15 min instead of 30 sec.

btw, what do u think about the first part (eMule sending the port twice)?

Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#4 User is offline   lugdunummaster 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Member_D
  • Posts: 1040
  • Joined: 19-September 02

Posted 28 August 2005 - 03:08 PM

Quote

isn't that a little wasteful? can the tag be dropped?


Yes and yes

(The CT_PORT tag is simply ignored by eserver)
0

#5 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 28 August 2005 - 03:16 PM

thanx for clearifying it, lugdunummaster :)

if eFarm ignores it as well, it can be safely removed...

Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#6 User is offline   Tuxman 

  • lizzie and prog-rock fanatic
  • PipPipPipPipPipPipPip
  • Group: Validating
  • Posts: 2707
  • Joined: 26-July 04

Posted 25 September 2005 - 12:45 AM

One small thingy:
If I remove this, I get all servers dead or full. :P
[ eMule beba ] :: v2.72 released, v3.00 in the works ...
- feel the lightweight! - featuring Snarl support, the Client Analyzer and tits!
Coded by a Golden eMule Award winner and most people's favorite modder!
..........................................
Music, not muzak:
Progressive Rock :: my last.fm profile
..........................................
eMule user since 0.28 ...
-[ ... and thanks for all the fish! ]-
0

#7 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 25 September 2005 - 07:26 AM

Yeah - if you forget to lower the tagcount by one *fg*
0

#8 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 25 September 2005 - 09:05 AM

@Tuxman, Wiz
thanx, u reminded me what i've forgot to do
in my mod, lol.

btw, after the tagcount change, did u test it?
is it working properly?

Regrads,
Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#9 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 25 September 2005 - 09:26 AM

Eurrrr lol - I've removed that tag for some weeks now and no problem so far ;)
I did not think you could forget that, otherwise, I'd posted that a long time ago :flowers:
0

#10 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 25 September 2005 - 09:32 AM

@Wiz
lol
u forgot i released alot of fixes/improvements
this last 2 months or so with some questions etc...

also, to write the changelog in hebMule2 v1.0, i had to
search with VS.net all my changes to make sure
i didn't forget a thing (which shows i changed stuff like crazy :P )

anyway, thanx, gonna change it for my next release...

Regards,
Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users