On 01/22/2014 07:45 AM, Alex Rousskov wrote:
> I can think of two very different ways to go forward from here:
> 
> A) Forget about other agents, sides, etc. and focus on the HTTP server
> (i.e., client-side*cc) code exclusively. That code does not need a
> TcpReceiver. It needs a lot of work, but extracting TCP reading code
> into an abstract class is not one of them!
+1

On the server-side there is a base class which can be used to implement
server-side for various protocols, the ServerStateData, and this is used
to implement http and ftp server side.

We need to implement something similar to the client-side, spliting
ConnStateData and maybe other classes.

> 
> B) Try to implement a common parent for all existing TCP protocol
> agents/sides. That common parent, let's call it TcpAgent for the purpose
> of this discussion, will have code to read and write messages. There is
> lots of common, complex code to extract from the existing agents into
> this common parent! If we go a step further, many Agents also maintain a
> connection pool, so you may add a TcpAgentWithPool class of some kind.

This is maybe can be start after the (A)

> 
> IMO, both approaches above are valid in isolation, but mixing them may
> cause trouble.
> 

Reply via email to