Send V1 version message header to the transport. */
| 1156 | |
| 1157 | /** Send V1 version message header to the transport. */ |
| 1158 | void SendV1Version(const MessageStartChars& magic) |
| 1159 | { |
| 1160 | CMessageHeader hdr(magic, "version", 126 + m_rng.randrange(11)); |
| 1161 | DataStream ser{}; |
| 1162 | ser << hdr; |
| 1163 | m_to_send.insert(m_to_send.end(), UCharCast(ser.data()), UCharCast(ser.data() + ser.size())); |
| 1164 | } |
| 1165 | |
| 1166 | /** Schedule bytes to be sent to the transport. */ |
| 1167 | void Send(std::span<const std::byte> data) { Send(MakeUCharSpan(data)); } |