Archived

This topic is now archived and is closed to further replies.

transferring a file over the network

This topic is 5274 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, I''m writing an app that transfers files (big, > 50MB) over the network. I''m using directplay, coz it''s part of the game i''m developing using dx. but then i don''t see any function in directplay that can stream a file, the only thing it provides is a SendTo() that sends a network message. Would that be entirely stupid to chop the file down to tiny blocks, send them by messages, and reassemble them? Is there better solution? So anyhow, how would people usually do file streaming? Even if i have to switch to winsock. Would be grateful if anyone can share anything =) Thanks in advance

Share this post


Link to post
Share on other sites
Do you want to save a file on remote system linking over a network? Given that the remote system drive is mapped onto the local system, one solution is to simple create a new file on the remote system and use WriteFile(). Otherwise, one solution is winsock.

Kuphryn

Share this post


Link to post
Share on other sites
I suggest you lookup the function ''TransmitFile()'' in the Platform SDK : Windows Sockets 2 docs. It has been designed specifically for streaming large files very efficiently over TCP.

-cb

Share this post


Link to post
Share on other sites