Can handle transferring a file in blocks over connection adapter.
More...
#include <file_transfer_entry.hpp>
|
bool | done () const |
| Has the transfer finished. More...
|
|
| FileTransferEntry (const string &uri, vector< char > &buffer, unsigned int handle, weak_ptr< OutputSessionClass > session, unsigned int blockSize, unsigned int timeout_ms) |
| Constructor. More...
|
|
unsigned int | handle () const |
| Get the identification handle of this transfer. More...
|
|
bool | matches (const string &uri, shared_ptr< OutputSessionClass > session) const |
| Do the given arguments match this transfer. More...
|
|
void | progress () |
| Progress the transfer by sending one block. More...
|
|
virtual | ~FileTransferEntry () |
| dtor More...
|
|
|
unsigned int | m_blockIndex |
| The index of the block that is to be sent. More...
|
|
unsigned int | m_blockSize |
| How big is one single block that is transferred on one go (last block may be smaller) More...
|
|
vector< char > | m_buf |
| Contains the whole data to send. More...
|
|
unsigned int | m_handle |
| Unique identifier for the file so it can be identified by both parties of the transfer (sender and receiver) when there are several blocks. More...
|
|
vector< char >::iterator | m_pos |
| The position on the buffer that has been sent. More...
|
|
unsigned int | m_remainingSize |
| How many bytes there is still left in the file to be transferred. More...
|
|
weak_ptr< OutputSessionClass > | m_session |
| The output which does the actual sending. More...
|
|
unsigned int | m_timeout_ms |
| The server will inform the client how long to wait for the entire transaction to complete. More...
|
|
string | m_uri |
| The path to the file to be transferred. More...
|
|
template<typename OutputSessionClass>
class kanzi::connect::FileTransferEntry< OutputSessionClass >
Can handle transferring a file in blocks over connection adapter.
◆ FileTransferEntry()
template<typename OutputSessionClass >
Constructor.
- Parameters
-
uri | Identifies the file |
buffer | Contains the data to send |
handle | Identifies the file transfer when there are multiple blocks being sent |
session | Implements the actual output used to send |
blockSize | How big is one single block that is transferred on one go |
timeout_ms | The server will inform the client how long to wait for the entire transaction to complete |
◆ ~FileTransferEntry()
template<typename OutputSessionClass >
◆ done()
template<typename OutputSessionClass >
Has the transfer finished.
- Returns
- True if yes
◆ handle()
template<typename OutputSessionClass >
Get the identification handle of this transfer.
- Returns
- the handle
◆ matches()
template<typename OutputSessionClass >
Do the given arguments match this transfer.
- Parameters
-
uri | Identify the file |
session | The session which does the transfer |
◆ progress()
template<typename OutputSessionClass >
Progress the transfer by sending one block.
◆ m_blockIndex
template<typename OutputSessionClass >
The index of the block that is to be sent.
◆ m_blockSize
template<typename OutputSessionClass >
How big is one single block that is transferred on one go (last block may be smaller)
◆ m_buf
template<typename OutputSessionClass >
Contains the whole data to send.
◆ m_handle
template<typename OutputSessionClass >
Unique identifier for the file so it can be identified by both parties of the transfer (sender and receiver) when there are several blocks.
◆ m_pos
template<typename OutputSessionClass >
The position on the buffer that has been sent.
◆ m_remainingSize
template<typename OutputSessionClass >
How many bytes there is still left in the file to be transferred.
◆ m_session
template<typename OutputSessionClass >
The output which does the actual sending.
◆ m_timeout_ms
template<typename OutputSessionClass >
The server will inform the client how long to wait for the entire transaction to complete.
◆ m_uri
template<typename OutputSessionClass >
The path to the file to be transferred.
The documentation for this class was generated from the following file:
- virtualfile_service/file_transfer_entry.hpp