Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Так работает:
- QByteArray data;
- QDataStream out(&data, QIODevice::WriteOnly);
- for(int i = 0; i < 10000;i++)
- out << 1;
- if(!data.isEmpty())
- {
- udpSocket_->writeDatagram(data, hostAddress_, port_);
- qDebug()<<"write message to:"<<hostAddress_<<" "<<port_;
- }
- А так нет(в for 0 добавили и всё):
- QByteArray data;
- QDataStream out(&data, QIODevice::WriteOnly);
- for(int i = 0; i < 100000;i++)
- out << 1;
- if(!data.isEmpty())
- {
- udpSocket_->writeDatagram(data, hostAddress_, port_);
- qDebug()<<"write message to:"<<hostAddress_<<" "<<port_;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement