Open ben-crowhurst opened 8 years ago
First attempt to draft out the Protocol interface given the current work being performed on the Socket encapsulation.
Protocol::to_bytes( Request );
Protocol::to_bytes( Response );
Protocol::is_open( Request );
Protocol::is_closed( Request );
Protocol::close( Request );
Protocol::sync( Request, success_handler = nullptr, error_handler = nullptr );
Protocol::async( Request, success_handler, error_handler );
Protocol::fetch( size_t length, Response );
Protocol::fetch( string delimiter, Response );
Protocol::fetch( Bytes delimiter, Response );
Protocol::make_request( ... );
Protocol::make_response( ... );