Home > Back-end >  Qtcpsocket client and winsocket server-side QIODevice: : write (Qtcpsocket) : device not open
Qtcpsocket client and winsocket server-side QIODevice: : write (Qtcpsocket) : device not open

Time:03-08

 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:

reference 1st floor zhao4zhong1 response:
baidu search relevant keywords,

Thank you teacher

CodePudding user response:

reference 1st floor zhao4zhong1 response:
baidu search relevant keywords,

The words of "highest in ancient and modern", on the one hand, mapping out to say it on the issue of ignorance, but on the other hand played a "heal the building Lord lazy carcinoma" effect,

CodePudding user response:

Mapping and mapping

CodePudding user response:

Hello, problem solved? I also met the same problem, hope to be able to get more information,

CodePudding user response:

To ask, and answer
  • Related