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";
311 auto const size = boost::asio::buffer_size(buffers);
346 if (header->total_wire_size > size)
348 hint = header->total_wire_size - size;
354 switch (header->message_type)
356 case protocol::mtMANIFESTS:
357 success = detail::invoke<protocol::TMManifests>(*header, buffers, handler);
359 case protocol::mtPING:
360 success = detail::invoke<protocol::TMPing>(*header, buffers, handler);
362 case protocol::mtCLUSTER:
363 success = detail::invoke<protocol::TMCluster>(*header, buffers, handler);
365 case protocol::mtENDPOINTS:
366 success = detail::invoke<protocol::TMEndpoints>(*header, buffers, handler);
368 case protocol::mtTRANSACTION:
369 success = detail::invoke<protocol::TMTransaction>(*header, buffers, handler);
371 case protocol::mtGET_LEDGER:
372 success = detail::invoke<protocol::TMGetLedger>(*header, buffers, handler);
374 case protocol::mtLEDGER_DATA:
375 success = detail::invoke<protocol::TMLedgerData>(*header, buffers, handler);
377 case protocol::mtPROPOSE_LEDGER:
378 success = detail::invoke<protocol::TMProposeSet>(*header, buffers, handler);
380 case protocol::mtSTATUS_CHANGE:
381 success = detail::invoke<protocol::TMStatusChange>(*header, buffers, handler);
383 case protocol::mtHAVE_SET:
384 success = detail::invoke<protocol::TMHaveTransactionSet>(*header, buffers, handler);
386 case protocol::mtVALIDATION:
387 success = detail::invoke<protocol::TMValidation>(*header, buffers, handler);
389 case protocol::mtVALIDATOR_LIST:
390 success = detail::invoke<protocol::TMValidatorList>(*header, buffers, handler);
392 case protocol::mtVALIDATOR_LIST_COLLECTION:
394 detail::invoke<protocol::TMValidatorListCollection>(*header, buffers, handler);
396 case protocol::mtGET_OBJECTS:
397 success = detail::invoke<protocol::TMGetObjectByHash>(*header, buffers, handler);
399 case protocol::mtHAVE_TRANSACTIONS:
400 success = detail::invoke<protocol::TMHaveTransactions>(*header, buffers, handler);
402 case protocol::mtTRANSACTIONS:
403 success = detail::invoke<protocol::TMTransactions>(*header, buffers, handler);
405 case protocol::mtSQUELCH:
406 success = detail::invoke<protocol::TMSquelch>(*header, buffers, handler);
408 case protocol::mtPROOF_PATH_REQ:
409 success = detail::invoke<protocol::TMProofPathRequest>(*header, buffers, handler);
411 case protocol::mtPROOF_PATH_RESPONSE:
412 success = detail::invoke<protocol::TMProofPathResponse>(*header, buffers, handler);
414 case protocol::mtREPLAY_DELTA_REQ:
415 success = detail::invoke<protocol::TMReplayDeltaRequest>(*header, buffers, handler);
417 case protocol::mtREPLAY_DELTA_RESPONSE:
418 success = detail::invoke<protocol::TMReplayDeltaResponse>(*header, buffers, handler);
421 handler.onMessageUnknown(header->message_type);
426 result.
first = header->total_wire_size;