Ok, it's pretty simple :

- the client ask for a new incoming connection to x.x.x.x:80 and open a new random port. It sends a SYN packet to x.x.x.x with its IP and this random port (and some other headers)

- the server open a new connection to the client on this port.

That's why the client is limited to 65535 outgoing connections.

And yes the server identify the fd by its ip:port.

Hop im clear ;)

Anthony Catel - envoyé depuis mon iPhone

Le 3 juin 2010 à 13:30, Nouknouk <[email protected]> a écrit :

Le 03/06/2010 13:21, Anthony Catel a écrit :


Nouknouk a écrit :
Hi,

two things you may point your attention on:

- on linux servers, the number of file descriptors (socket has a file descriptor) is limited by kind of 'user policy'. Take a look at the 'ulimit' command (you may want to do something like 'ulimit -n 99999' to raise the maximum of concurrent opened fd)|.
|
This is the goal of rlimit_nofile. APE Server increase this value itself.

Ok, didn't know.

||
- afaik there are only 2^16 ports available for TCP protocol, so I suppose a single computer cannot have more than 2^16 connexion at the same time.

No, it's a server, there is only one port used while a client open a new port for each new outgoing connection. So, it's not the issue ;)

Plus a real question, just to understand: I thought there was two kind of ports in TCP: source AND destination ports, both being 16 bits values ; if the same destination port's value is used by every client, how does the server's TCP stack to identify to which 'client fd' belongs the just received network packet ? A combination of IP + port ?

Nouk²

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to