ethereum/cpp-ethereum — pull request #373 by subtly (2014-10-13 21:45:42+00:00)
Title: Code review PR: RPC, libdevnet, RLPX

This pull request is for RPC support as well as libdevnet, an experimental library which supports full-duplex, asynchronous, and synchronous protocols. It's expected to support exposing shared interfaces (e.g., RPC), encryption, framing (QoS, bandwidth optimization), and channels. Together with streaming and asynchronous support, this also means "push" is available for othonerwise-synchronous protocols. The service listener (Endpoint), connections, and protocols are decoupled from each other, although Service is coupled to a protocol (via template parameters).

Notably, a 'protocol state' can out-live it's connection, services can be used without an endpoint, protocols can be used without an endpoint or service, and connections can be used on their own.

This introduces a "Protocol" class which can implement any of: interpretation, encapsulation, protocol state, and connection state. And, where a Service is used, the service may perform these duties instead.

This enables a developer to build and adapt layered protocols independent of the underlying RLPX protocol. Ideally, encryption and framing can be added to RLPX without downstream changes and downstream application protocols are guaranteed not to introduce interference.