本文整理汇总了C++中OutStream::get_data方法的典型用法代码示例。如果您正苦于以下问题:C++ OutStream::get_data方法的具体用法?C++ OutStream::get_data怎么用?C++ OutStream::get_data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutStream
的用法示例。
在下文中一共展示了OutStream::get_data方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: send_timestamp_chunk
void send_timestamp_chunk(bool ignore_time_interval = false)
{
StaticOutStream<12 + GTF_SIZE_KEYBUF_REC * sizeof(uint32_t) + 1> payload;
payload.out_timeval_to_uint64le_usec(this->timer);
if (this->send_input) {
payload.out_uint16_le(this->mouse_x);
payload.out_uint16_le(this->mouse_y);
payload.out_uint8(ignore_time_interval ? 1 : 0);
/*
for (uint32_t i = 0, c = keyboard_buffer_32.size() / sizeof(uint32_t);
i < c; i++) {
LOG(LOG_INFO, "send_timestamp_chunk: '%c'(0x%X)",
(keyboard_buffer_32.data[i]<128)?(char)keyboard_buffer_32.data[i]:'?',
keyboard_buffer_32.data[i]);
}
*/
payload.out_copy_bytes(keyboard_buffer_32.get_data(), keyboard_buffer_32.get_offset());
keyboard_buffer_32 = OutStream(keyboard_buffer_32_buf);
}
send_wrm_chunk(this->trans, TIMESTAMP, payload.get_offset(), 1);
this->trans.send(payload.get_data(), payload.get_offset());
this->last_sent_timer = this->timer;
}