El Wed, 25 Aug 2010 21:44:48 +0200, Julio escribió: > El mié, 25-08-2010 a las 12:27 -0700, Ricardo Delgado escribió: >> estoy tratando de entender conceptualmente a nivel de socket, es decir, >> como hace para atender las peticiones a traves del puerto 80, siendo >> que la conexion esta disponible solo 1 vez segun entiendo, entonces, no >> deberia abrir un puerto por cada conexion? no logro entender bien como >> se las ingenia para tener el puerto 80 siempre disponible, supongo que >> derivara las peticiones, a otro puerto? liberando el 80? > > El socket queda definido por las dos direcciones IP, los dos puertos y > el protocolo que los une, por lo que cada conexión es diferente y puede > atender en el puerto 80 a varias conexiones, que vendrán de diferente IP > y/o puerto. > > http://es.wikipedia.org/wiki/Socket_de_Internet
El artículo en inglés añade algunos datos interesantes: *** http://en.wikipedia.org/wiki/Internet_socket#Socket_states_and_the_client-server_model "(...) A TCP server may serve several clients concurrently, by creating a child process for each client and establishing a TCP connection between the child process and the client. Unique dedicated sockets are created for each connection. These are in established state, when a socket-to- socket virtual connection or virtual circuit (VC), also known as a TCP session, is established with the remote socket, providing a duplex byte stream. (...) A server may create several concurrently established TCP sockets with the same local port number and local IP address, each mapped to its own server-child process, serving its own client process. They are treated as different sockets by the operating system, since the remote socket address (the client IP address and/or port number) are different; i.e. since they have different socket pair tuples (see below)." *** Saludos, -- Camaleón -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

