Instant messaging (IM) is a real-time messaging service that allows a user to establish certain chat room in a network. It mainly includes an IM server and multiple IM clients. Peer-to-peer (P2P) is a communications technology in which each party has the same capabilities, by which the use can user a direct connection between computers to share and transfer files.
In a conventional IM system, a user can use the IM clients to implement P2P communications. When transferring files, a sender's client software that resides on the sender's computing device (hereinafter generally referred to as “client”) establishes a P2P connection with a receiver's client, and transfers the files one by one. The pitfall is that such method cannot directly transfer files based on a file directory. In other words, the sender's client cannot automatically transfer all files under the file directory, without the user's intervention, to the receiver's client. Likewise, the receiver's client cannot automatically store the received files into an equivalent file directory as that on the sender's side.