Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Windows support an option? #30

Open
h5rdly opened this issue Jan 3, 2017 · 2 comments
Open

Is Windows support an option? #30

h5rdly opened this issue Jan 3, 2017 · 2 comments

Comments

@h5rdly
Copy link

h5rdly commented Jan 3, 2017

Hi,

First, this is a sweet utility, thanks for maintining it!

I read that Windows allegedly supports zero copy via a Winsock function called TransmitFile -
https://msdn.microsoft.com/en-us/library/windows/desktop/ms740565(v=vs.85).aspx
"TransmitFile is not functional on transports that perform their own buffering... Because TransmitFile achieves its performance gains by sending data directly from the file cache."

Would it be possible to make pysendfile work on windows as well?
It would be super useful, and I suspect add it much popularity, as it would allow using it in a completely cross-platform manner. Personally I'm intrigued by pen-testing library utilizations, but that's just the tip of it, could probably be used by corporate-level datatbases and whatnot :)

@giampaolo
Copy link
Owner

Hello, yes it would be extremely nice to have. Years ago I tried to implement this integration by using pywin32 but I got stuck:
https://mail.python.org/pipermail/python-win32/2011-January/011107.html
This was long ago and I've never tried again since then.
In order to move this forward we should still come up with a PoC in pure Python which uses pywin32 and sends a file at least in blocking mode.

@h5rdly
Copy link
Author

h5rdly commented Jan 3, 2017

Honestly, I'm not sure how to approach this, except perhaps that the select() module might come handy -
http://stackoverflow.com/questions/12194701/asynchronous-sockets-with-select-python

That question was asked a while ago, perhaps asking in stackoverflow will yield better answers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants