摘要 |
Provided are a method and apparatus for transmitting a file and a method and apparatus for downloading a file. The method for transmitting a file is used for a sender to transmit a file to a receiver, and comprises: receiving a file request sent by a first receiver among the receivers; according to the file request, determining a first file required by the first receiver; and multi-casting the first file to all receivers. The method for downloading the file is used for a receiver to download a file from a sender, and comprises: receiving a file multi-cast by the sender in response to a file request of the receiver or any other receivers; when it is determined that the received file is not the file requested by the receiver, abandoning the file; and when it is determined that the received file is the file requested by the receiver, reserving the file. The apparatus corresponds to the method. The method and apparatus provided by the present invention can increase the file transmission efficiency and simplify the file transmission process. |