Saskia van Schagen:
> Victor, thanks for trying to help out. But still this cannot be true. In
> Postfix I cannot setup a different socket for each smtpd process, if I had
> 100 smtpd processes, I cannot tell Postfix that each of these 100 processes
> should connect with a different client socket.

You have fundamentally not understood how TCP or UNIX-domain sockets work. 

> So we have one socket here, with 1 client side and 1 server side and we're
> going to keep the connection alive.

No, there are N client endpoints for 1 server endpoint. The client
invokes connect(); the server invokes listen() once and invokes
accept() for every client connection. Then the server can receive
data over TCP streams.

Example:

server does listen() on 127.0.0.1 port 25

client does connect() to 127.0.0.1 port 25 from 127.0.0.1 port 5001

server does accept() which returns a socket for the above connection

client does connect() to 127.0.0.1 port 25 from 127.0.0.1 port 5002

server does accept() which returns a socket for the above connection

Now the server has two sockets for the accepted connections, and one
socket for accepting new connections.

Looks like you are accepting only one connection at a time.

        Wietse

Reply via email to