[pywin32-bugs] [ pywin32-Patches-1962146 ] win32file.TransmitFile patch
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2008-05-12 03:06:52
|
Patches item #1962146, was opened at 2008-05-12 06:06 Message generated for change (Comment added) made by ionel_mc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=1962146&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: ionel (ionel_mc) Assigned to: Nobody/Anonymous (nobody) Summary: win32file.TransmitFile patch Initial Comment: sample usage: import win32file, socket, pywintypes s = socket.socket() f = file('somefile','rb') s.connect(('192.168.111.128',10002)) ol = pywintypes.OVERLAPPED() print win32file.TransmitFile(s, win32file._get_osfhandle(f.fileno()), 0, 0, ol, 0, "prepended data", "appended data") length = win32file.GetOverlappedResult(s.fileno(), ol, 1) print length I hope I haven't done the wrong thing but for the sake of simplicity I'm providing a patch the includes the previous ConnectEx patch (hopefully it'll get accepted :) ---------------------------------------------------------------------- >Comment By: ionel (ionel_mc) Date: 2008-05-12 06:06 Message: Logged In: YES user_id=1189761 Originator: YES File Added: test_transmitfile.py ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=1962146&group_id=78018 |