]> git.ipfire.org Git - thirdparty/squid.git/commit
Switched from sendto/recvfrom to sendmsg/recvmsg for UDS I/O. Replaced
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 29 Apr 2010 20:12:03 +0000 (14:12 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 29 Apr 2010 20:12:03 +0000 (14:12 -0600)
commit1bac0258ae64bb1687d4efba9669c478d853ff76
tree3f514a01d1e3a251cca61863fb2127c279e15c9d
parentb81949b9b72cd3cb539d1459d0d86077514d968d
Switched from sendto/recvfrom to sendmsg/recvmsg for UDS I/O. Replaced
inlined sendto/recvfrom hacks with FD_WRITE/READ_METHOD-based code.

A common msghdr-based interface allows us to use the same API for regular
IPC messages and for future messages that pass socket descriptors. While
msghdr allows for complex vector-based scatter/gather I/O, the IPC code
limits complexity by using a single-element I/O vector and a control message
part dedicated to passing descriptors.

Added a temporary hack to block-sleep between IPC message sending attempts so
that we do not use up all the allowed attempts in a short period of time. The
hack will be replace with a non-blocking addEvent-based sleep.
15 files changed:
src/comm.cc
src/enums.h
src/fd.cc
src/fde.h
src/ipc/Coordinator.cc
src/ipc/Coordinator.h
src/ipc/Makefile.am
src/ipc/Messages.cc [new file with mode: 0644]
src/ipc/Messages.h [new file with mode: 0644]
src/ipc/Port.cc
src/ipc/Port.h
src/ipc/Strand.cc
src/ipc/Strand.h
src/ipc/UdsOp.cc
src/ipc/UdsOp.h