Answer the question
In order to leave comments, you need to log in
Transferring large files over the network?
Hello!
Dealing with file transfer over the network
I want to implement the following (like a torrent system) on sockets and using the TCP protocol
1. The server shares files
2. Clients can download these files
3. The client can download one file from several servers at the same time
4. Need to handle disconnections
For example, there is a 1GB file - we break it into packages
1. the server shares the file
2. Sends to all clients that it has shared the file - name and size
3. Clint sends a request that he needs to download - some package
4. The server can either forward this file - if there is such a package
either return a message that there is no such file
5. The client can distribute this file to other clients
Tell me how to implement this ?? how to organize the definition of these commands?
For each new connection to use a separate thread?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question