I have two methods to write a literal integer into a stream buffer for RPC:
method 1:
std::stringstream ss; ss << uint16_t(1); <
std::stringstream ss; ss << uint16_t(1);