Internal class for TFTP processing.
More...
#include <TFTP.h>
|
| TFTP_Transaction () |
| Start a TFTP transaction. More...
|
|
void | processWRQ () |
| Process a client write request. More...
|
|
void | processRRQ () |
| Process a client read request. More...
|
|
void | sendAck (uint16_t blockNumber) |
| Send an acknowledgment back to the partner. A TFTP acknowledgment packet contains an opcode (4) and a block number. More...
|
|
void | sendError (uint16_t code, std::string message) |
| Send an error indication to the client. More...
|
|
void | setBaseDir (std::string baseDir) |
| Set the base dir for file access. If we are asked to put a file to the file system, this is the base relative directory. More...
|
|
void | waitForAck (uint16_t blockNumber) |
| Wait for an acknowledgment from the client. After having sent data to the client, we expect an acknowledment back from the client. This function causes us to wait for an incoming acknowledgment.
|
|
uint16_t | waitForRequest (Socket *pServerSocket) |
| Wait for a client request. A TFTP server waits for requests to send or receive files. A request can be either WRQ (write request) which is a request from the client to write a new local file or it can be a RRQ (read request) which is a request from the client to read a local file. More...
|
|
Internal class for TFTP processing.
TFTP::TFTP_Transaction::TFTP_Transaction |
( |
| ) |
|
Start a TFTP transaction.
- Returns
- N/A.
void TFTP::TFTP_Transaction::processRRQ |
( |
| ) |
|
Process a client read request.
- Returns
- N/A.
void TFTP::TFTP_Transaction::processWRQ |
( |
| ) |
|
Process a client write request.
- Returns
- N/A.
void TFTP::TFTP_Transaction::sendAck |
( |
uint16_t |
blockNumber | ) |
|
Send an acknowledgment back to the partner. A TFTP acknowledgment packet contains an opcode (4) and a block number.
- Parameters
-
[in] | blockNumber | The block number to send. |
- Returns
- N/A.
void TFTP::TFTP_Transaction::sendError |
( |
uint16_t |
code, |
|
|
std::string |
message |
|
) |
| |
Send an error indication to the client.
- Parameters
-
[in] | code | Error code to send to the client. |
[in] | message | Explanation message. |
- Returns
- N/A.
void TFTP::TFTP_Transaction::setBaseDir |
( |
std::string |
baseDir | ) |
|
Set the base dir for file access. If we are asked to put a file to the file system, this is the base relative directory.
- Parameters
-
baseDir | Base directory for file access. |
- Returns
- N/A.
uint16_t TFTP::TFTP_Transaction::waitForRequest |
( |
Socket * |
pServerSocket | ) |
|
Wait for a client request. A TFTP server waits for requests to send or receive files. A request can be either WRQ (write request) which is a request from the client to write a new local file or it can be a RRQ (read request) which is a request from the client to read a local file.
- Parameters
-
pServerSocket | The server socket on which to listen for client requests. |
- Returns
- The op code received.
The documentation for this class was generated from the following files: