45 case protocol::mtMANIFESTS:
47 case protocol::mtPING:
49 case protocol::mtCLUSTER:
51 case protocol::mtENDPOINTS:
53 case protocol::mtTRANSACTION:
55 case protocol::mtGET_LEDGER:
57 case protocol::mtLEDGER_DATA:
59 case protocol::mtPROPOSE_LEDGER:
61 case protocol::mtSTATUS_CHANGE:
63 case protocol::mtHAVE_SET:
65 case protocol::mtVALIDATOR_LIST:
66 return "validator_list";
67 case protocol::mtVALIDATOR_LIST_COLLECTION:
68 return "validator_list_collection";
69 case protocol::mtVALIDATION:
71 case protocol::mtGET_OBJECTS:
73 case protocol::mtHAVE_TRANSACTIONS:
74 return "have_transactions";
75 case protocol::mtTRANSACTIONS:
76 return "transactions";
77 case protocol::mtSQUELCH:
79 case protocol::mtPROOF_PATH_REQ:
80 return "proof_path_request";
81 case protocol::mtPROOF_PATH_RESPONSE:
82 return "proof_path_response";
83 case protocol::mtREPLAY_DELTA_REQ:
84 return "replay_delta_request";
85 case protocol::mtREPLAY_DELTA_RESPONSE:
86 return "replay_delta_response";
304 auto const size = boost::asio::buffer_size(buffers);
338 if (header->total_wire_size > size)
340 hint = header->total_wire_size - size;
346 switch (header->message_type)
348 case protocol::mtMANIFESTS:
349 success = detail::invoke<protocol::TMManifests>(*header, buffers, handler);
351 case protocol::mtPING:
352 success = detail::invoke<protocol::TMPing>(*header, buffers, handler);
354 case protocol::mtCLUSTER:
355 success = detail::invoke<protocol::TMCluster>(*header, buffers, handler);
357 case protocol::mtENDPOINTS:
358 success = detail::invoke<protocol::TMEndpoints>(*header, buffers, handler);
360 case protocol::mtTRANSACTION:
361 success = detail::invoke<protocol::TMTransaction>(*header, buffers, handler);
363 case protocol::mtGET_LEDGER:
364 success = detail::invoke<protocol::TMGetLedger>(*header, buffers, handler);
366 case protocol::mtLEDGER_DATA:
367 success = detail::invoke<protocol::TMLedgerData>(*header, buffers, handler);
369 case protocol::mtPROPOSE_LEDGER:
370 success = detail::invoke<protocol::TMProposeSet>(*header, buffers, handler);
372 case protocol::mtSTATUS_CHANGE:
373 success = detail::invoke<protocol::TMStatusChange>(*header, buffers, handler);
375 case protocol::mtHAVE_SET:
376 success = detail::invoke<protocol::TMHaveTransactionSet>(*header, buffers, handler);
378 case protocol::mtVALIDATION:
379 success = detail::invoke<protocol::TMValidation>(*header, buffers, handler);
381 case protocol::mtVALIDATOR_LIST:
382 success = detail::invoke<protocol::TMValidatorList>(*header, buffers, handler);
384 case protocol::mtVALIDATOR_LIST_COLLECTION:
385 success = detail::invoke<protocol::TMValidatorListCollection>(*header, buffers, handler);
387 case protocol::mtGET_OBJECTS:
388 success = detail::invoke<protocol::TMGetObjectByHash>(*header, buffers, handler);
390 case protocol::mtHAVE_TRANSACTIONS:
391 success = detail::invoke<protocol::TMHaveTransactions>(*header, buffers, handler);
393 case protocol::mtTRANSACTIONS:
394 success = detail::invoke<protocol::TMTransactions>(*header, buffers, handler);
396 case protocol::mtSQUELCH:
397 success = detail::invoke<protocol::TMSquelch>(*header, buffers, handler);
399 case protocol::mtPROOF_PATH_REQ:
400 success = detail::invoke<protocol::TMProofPathRequest>(*header, buffers, handler);
402 case protocol::mtPROOF_PATH_RESPONSE:
403 success = detail::invoke<protocol::TMProofPathResponse>(*header, buffers, handler);
405 case protocol::mtREPLAY_DELTA_REQ:
406 success = detail::invoke<protocol::TMReplayDeltaRequest>(*header, buffers, handler);
408 case protocol::mtREPLAY_DELTA_RESPONSE:
409 success = detail::invoke<protocol::TMReplayDeltaResponse>(*header, buffers, handler);
412 handler.onMessageUnknown(header->message_type);
417 result.
first = header->total_wire_size;