-2
我需要在C++中将大文件中的所有数据写入TFTP数据包(512字节)。我知道在客户端和服务器之间成功传输文件需要以下标准。TFTP数据包
TFTP supports five types of packets, all of which have been mentioned below:
opcode operation
1 Read request (RRQ)
2 Write request (WRQ)
3 Data (DATA)
4 Acknowledgment (ACK)
5 Error (ERROR)
The TFTP header of a packet contains the opcode associated with that packet.
2 bytes string 1 byte string 1 byte
------------------------------------------------
| Opcode | Filename | 0 | Mode | 0 |
如何以最简单的方式在C++中生成这样的包协议(即指定头文件和操作码)? 我在网上随处搜索,找不到有用的C++或C解决方案。另外,我应该使用UDP吗?
谢谢克劳斯....它的帮助.. – MDK