TransmitFile

If I want to use the TransmitFile function to send a file over a socket, how to I recieve it on the other end? Do I create a separate socket for filetransfer? Any suggestions....
sa9813Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ufolk123Connect With a Mentor Commented:

For TransmitFile() you need a valid connected socket ( after accept on server side or after connect on cleint side) and use this API to push the file data in .On the other end of socket you need to read() and get the data.So this is only a MS specfic wrapper to ordinary send through sockets for file data.

AS MS help specifies,
The Windows Sockets TransmitFile function transmits file data over a connected socket handle. This function uses the operating system’s cache manager to retrieve the file data, and provides high-performance file data transfer over sockets.
0
All Courses

From novice to tech pro — start learning today.