void TcpConnect: : sendMessage ()
{
//test header information
VideoHead video_head;
Video_head. Set_type (1);
Video_head. Set_fps (29);
Video_head. Set_numframe (100);
Char c_head [100].
Memset (c_head, '0', sizeof (c_head));
Video_head. SerializePartialToArray (c_head, 100);
Tcp_socket - & gt; Write (c_head, 100);
Tcp_socket - & gt; Flush ();
if(! Tcp_socket - & gt; WaitForBytesWritten (3000))
{
QMessageBox: : about (NULL, "Tcp error", "send error!" );
}
QDebug () & lt;
}
CodePudding user response:
Baidu search relevant keywords,
CodePudding user response: