문제

I'm using the TransmitFile API with I/O completion ports for an efficient multithreaded file server on Windows.

This all works fine, but I've now also implemented secure sockets using SChannel. Because TransmitFile streams the file directly to the socket, I don't see a way to call EncryptMessage - will I need to read the file in chunks, encrypting and transmitting them manually?

This seems a bit silly when TransmitFile is provided for the sole purpose of high performance file transfer, and secure sockets are pretty commonplace. I wonder what IIS does, considering I believe TransmitFile was implemented for IIS in the first place?

(I originally made "TransmitFile" and "EncryptMessage" hyperlinks but the spam protection only allowed one - sorry)

도움이 되었습니까?

해결책

TransmitFile is used by IIS, but not for encrypted data. I don't know what it actually does, but it is acknowledged that adding encryption will slow things down substantially.

TransmitFile uses the OS caches directly and any byte-by-byte operation (such as encryption) means that this is not possible.

I do see that IIS7 is specifically touted as improving SSL performance by doing the work in the kernel.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top