QT to achieve TCP file transfer
4.0
Application background TCP transmission control protocol is a network protocol for data transmission, and several Internet Protocols (HTTP, FTP) are all based on TCP protocol. TCP is a reliable transport protocol for data flow and connection.In the QT platform, the use of QTcpSocket to achieve POP3, SMTP and NNTP and other standard network protocols, but also can achieve a custom network protocol. Different from the QUdpSocket data transmission, QTcpSocket transmission is continuous data flow, suitable for continuous data. TCP programming is generally divided into client and server side, that is, the so-called C/S model.Before any data is transferred, an TCP must be built to connect to the remote host and port.