Click to See Complete Forum and Search --> : sending files using WinSock


TBONE917
December 8th, 2004, 10:03 AM
Can anyone tell me how to send executables, dlls, etc. using WinSock??

Andreas Masur
December 8th, 2004, 10:33 AM
Well...basically just like everything else...as a stream of bytes... :cool:

MikeAThon
December 8th, 2004, 06:43 PM
See this article "Network Transfer Of Files Using MFC's CSocket Class" at http://www.codeproject.com/internet/SocketFileTransfer.asp

The article uses CSocket, but it should be easy to adapt to blocking sockets

Mathew Joy
December 9th, 2004, 02:49 AM
Another method (most efficient while using winsock) is to use the API TramsmitFile(). This file is a MS specific extention. So you need mswsock.h and mswsock.lib.