On Fri, Sep 13, 2013 at 4:15 AM, Jeffrey Walton <[email protected]> wrote:
> I'm looking for the implementation details of how squid proxies its
> connections. That is (in pseudo code):
>
>     socket src = ... // client socket
>     socket dest = ... // server socket
>
>     int n = read(src, buffer)
>     write(dest, buffer, n)
>
> I imagine its not that naive, and I'm really interested in the
> techniques squid uses to improve performance around that locus.

Hello.
Squid uses an event-driven approach, based on select(2) and its more
modern and effective heirs, depending on what the OS supports.
You can find most of the relevant code in the src/comm/ subdirectory
of the source tree, as well as in comm.cc


-- 
    /kinkie

Reply via email to