how to transfer large files using QSocket
Printable View
how to transfer large files using QSocket
Could you provide any details on what you have already tried to achieve the goal? I believe there are examples bundled with Qt that describe how to use QSocket.
hi,
this is the code for upload a file from client side to server side
Code:
/*! Used to upload a file */ { if(l_file.exists()) { if ( l_file.open(IO_ReadOnly ) ) { l_byteArray = qCompress(l_byteArray); QString l_byteArraySize; l_byteArraySize.setNum(l_byteArray.size(),10); m_socket->writeBlock( l_byteArray,l_byteArray.size() ); } } }
it can read all bytes but QServer socket read only minimum amount of bytes.
what is solution for read all bytes ?