Official eMule-Board: Accepting Incoming Connections - Official eMule-Board

Jump to content


Page 1 of 1

Accepting Incoming Connections

#1 User is offline   Thievery 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 113
  • Joined: 22-November 04

Posted 02 September 2005 - 07:36 PM

Hi! :)

In my seach to understand how emule protocol is implemented i got a strange doubt.

How the client accepts incoming clients?

I thought that each emule client that tried to communicate with us went through AcceptConnectionCond() i added a AddDebugLogLine there but not every client in the upload queue that requested a file from me shows that line :S I than added to CClientReqSocket::ProcessPacket() andit shows a lot more there. :huh:

Can someone enlight me :flowers:

This post has been edited by Thievery: 02 September 2005 - 07:37 PM

"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us!" - Calvin & Hobbes
0

#2 User is offline   CiccioBastardo 

  • Doomsday Executor
  • PipPipPipPipPipPipPip
  • Group: Italian Moderators
  • Posts: 5541
  • Joined: 22-November 03

Posted 02 September 2005 - 09:59 PM

It may be you that contacted those clients (being source for you as well) opening the connection. So they belong to the ougoing connection category.
The problem is not the client, it's the user
0

#3 User is offline   Thievery 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 113
  • Joined: 22-November 04

Posted 04 September 2005 - 01:25 PM

CiccioBastardo, on Sep 2 2005, 09:59 PM, said:

It may be you that contacted those clients (being source for you as well) opening the connection. So they belong to the ougoing connection category.
View Post


I found out that if i added the AddDebugLogLine() to CListenSocket::OnAccept() the clients that were not logged in AcceptConnectionCond() were now logged.

Does this mean, like you said, that they were previously connected clients?



Thanks for the answer Ciccio :flowers:

This post has been edited by Thievery: 04 September 2005 - 01:26 PM

"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us!" - Calvin & Hobbes
0

#4 User is offline   Xman1 

  • Xtreme Modder
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1955
  • Joined: 21-June 03

Posted 04 September 2005 - 02:57 PM

the AcceptConnectionCond is only used if you set it at preferences
since 0.46a emule has two different methods for accepting connections.

see thePrefs.GetConditionalTCPAccept()
0

#5 User is offline   Thievery 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 113
  • Joined: 22-November 04

Posted 04 September 2005 - 07:13 PM

Xman1, on Sep 4 2005, 02:57 PM, said:

the AcceptConnectionCond is only used if you set it at preferences
since 0.46a emule has two different methods for accepting connections.

see thePrefs.GetConditionalTCPAccept()
View Post


That was what i was missing!

Thanks Xman1 :flowers:


[edit] typo

This post has been edited by Thievery: 05 September 2005 - 02:48 PM

"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us!" - Calvin & Hobbes
0

#6 User is offline   Thievery 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 113
  • Joined: 22-November 04

Posted 05 September 2005 - 02:48 PM

"o Fast connection reject
Fast Connection Reject uses a more efficient method to reject incoming TCP connection attempts of banned clients and/or from clients which IPs are found in IP-filter list. It's using a special Winsock feature called "conditional accept" which leads to less TCP overhead in case the TCP connection is rejected."

This is what is said in the help about this feature my question is: if this feature is an option is because of some catch, what is it?
"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us!" - Calvin & Hobbes
0

#7 User is offline   niRRity 

  • Avid Post Editor
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1229
  • Joined: 28-January 03

Posted 14 October 2005 - 12:21 PM

Thievery, on Sep 5 2005, 02:48 PM, said:

"o Fast connection reject
Fast Connection Reject uses a more efficient method to reject incoming TCP connection attempts of banned clients and/or from clients which IPs are found in IP-filter list. It's using a special Winsock feature called "conditional accept" which leads to less TCP overhead in case the TCP connection is rejected."

This is what is said in the help about this feature my question is: if this feature is an option is because of some catch, what is it?
View Post


I'm really interested in knowing the answer to that question myself, does nobody knows?

This post has been edited by niRRity: 14 October 2005 - 12:21 PM

0

#8 User is offline   Thievery 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 113
  • Joined: 22-November 04

Posted 15 October 2005 - 02:02 PM

During my research to understand this part of the implementation i got to this

there it says:

Quote

Note  To protect use of the WSAAccept function from SYN attacks, applications must perform full TCP handshakes (SYN-SYNACK-ACK) before reporting the connection request. Protecting against SYN attacks in this manner results in the SO_CONDITIONAL_ACCEPT socket option becoming inoperative; the conditional function is still called, and the WSAAccept function operates properly, but server applications that rely on clients being unable to perform the handshake will not operate properly.


Maybe this is the reason? :confused:

maybe a dev could give a little more insight in this matter :flowers:
"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us!" - Calvin & Hobbes
0

  • Member Options

Page 1 of 1

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