[PATCH] client-side redesign pt1 - Comm::TcpReceiver

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 04 Dec 2013 18:05:25 +1300

This patch abstracts the TCP socket operations out of existing
client-side code into a class which can be re-used for any TCP socket code.

It provides:

* data members for referencing a TCP socket and read buffer.

* methods for incremental parsing or processing of recieved data.

* methods for managing half and fully closing a socket.

* separation of socket read() from HTTP/1 parsing and processing logic.
 It may be re-used for any client-side or server-side TCP socket.

This patch includes only the Comm::TcpReceiver class and integration
with src/comm/. The integration and replacement of client-side code is
contained in the larger followup part-2 patch.

NOTE: the old delay-aware and half-closed monitoring logics are left out
of this class as they are currently very specific to the
client/server-side logics.

Amos

Received on Wed Dec 04 2013 - 05:05:44 MST

This archive was generated by hypermail 2.2.0 : Wed Dec 04 2013 - 12:00:09 MST