[ENet-discuss] Parallel file transfer using ENET?

Kenneth Bull llubnek at gmail.com
Tue Jun 28 12:02:01 PDT 2011


On 28 June 2011 13:17, sandeep nimmagadda <nimmagaddasandeep at gmail.com> wrote:
> Respected Members,
>
> I would like to know weather we can write a parallel file transfer program
> using ENET? Just like the way we do using threads in socket-programming. If
> we can do parallel file transfer using ENET please let me know the function
> which we can use to do so.
>
Probably better to just use UDP directly.

Would work like this:

Client opens a reliable (TCP) connection to server.
Server identifies itself to client.
Client requests information about a file.
Server reports the file size, block size and number of blocks (num_blocks).
Client reserves hard drive space for the file.
Client requests that block 0 to num_blocks - 1 be sent to port P.
Server sends blocks to client via UDP on port P.  Each block has a
brief header with the block number.  1 block == 1 UDP packet.
Client keeps track of which blocks it receives and saves the data to
it's local copy of the file.
Server replies to client via TCP to indicate it's done sending.
Client requests whatever blocks are missing be sent to port P.
Server sends blocks to client via UDP on port P.
...
Client reports to the server that it has received all blocks and disconnects.


More information about the ENet-discuss mailing list