Transferring data between two network sockets on Windows

+3


source to share


1 answer


The zero-copy API on Windows is called TransmitFile. It reads a file descriptor and writes a socket - it is usually used to serve static files from a web server. I think you can put the socket descriptor as the file descriptor as you usually can, even on Windows. If so, this should fix your problem. I'm not sure because I haven't tried it and the docs are not explicit on the matter. It's a zero-copy API, so if it doesn't work, uh, well, of course it should.



+1


source







All Articles