Bokhan Artem wrote:
Paul J Stevens пишет:

If you can think of, or direct me to a better approach for doing async
network reads in lmtp, please do share. I'm sure it's possible. But I
havent really dug into this yet.



Paul, I thought about nginx (http://sysoev.ru/nginx/nginx-0.7.37.tar.gz), it is widely used as http server, but also has functions of smtp proxy (to save cpu, processess/threads of mta; nginx uses single-process model). Main goals of nginx are high perfomance and very small memory usage, about 3mb per 10000 tcp connections, it supports kqueue, epoll, rt signals, /dev/poll, event ports, select and poll methods.

Mmm, pretty much like dbmail does also, using libevent. I haven't really looked into recvfrom. Looks to me like it's much the same as read(2).


It uses recvfrom syscall with epoll. May be you are intrested in my information.

recvfrom(25, "    }\r\n "..., 4096, 0, NULL, NULL) = 4096
recvfrom(25, "/p><p /><p"..., 4096, 0, NULL, NULL) = 4096
recvfrom(25, "0=B8 =D1=8"..., 4096, 0, NULL, NULL) = 4096
recvfrom(25, "2=D1=80=D1"..., 4096, 0, NULL, NULL) = 2192
recvfrom(25, 0x575be0, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(68, "DATA\r\n", 4096, 0, NULL, NULL) = 6


_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail



--
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to