void Server::sendFrame() { int start = 0; int k = 0; int n_pixels = vres*hres; while(k < n_pixels) { QByteArray _data; QDataStream _ds(&_data, QIODevice::ReadWrite); while(_data.size() < 500 && k < n_pixels) { _ds << frame[k++]; } QByteArray data; QDataStream ds(&data, QIODevice::ReadWrite); ds << WhiteNetwork::Message::PixelsData << start << k; ds.writeRawData(_data.data(), _data.size()); start = k; writeMessage(client_socket, data); } QByteArray data; QDataStream ds(&data, QIODevice::ReadWrite); ds << WhiteNetwork::Message::FrameSent; writeMessage(client_socket, data); }
void CAlertDialogInfo::OnCreate() { TBase::OnCreate(); cGuiAskActionInfo * pGuiAskAction = NULL; if( Item()->m_pParent ) { if( CFieldsBinder * pBinder = Item()->m_pParent->GetBinder() ) { CStructId _ds(cGuiAskActionInfo::eIID); pBinder->GetDataSource(_ds, (cSerializable **)&pGuiAskAction); } } Item()->AddDataSource(pGuiAskAction); }