Skip to content

Automatically exported from code.google.com/p/python-iocp

Notifications You must be signed in to change notification settings

elvisw/python-iocp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

python-iocp

Automatically exported from code.google.com/p/python-iocp

This project is in ALPHA stage by now

This project currently supports only sockets and lacks to notify reading, but it is in progress, come again later to check the new features to this project.

We implement simple and usable support for Windows IOCP on Python. Our module has no external dependencies. It only uses ctypes and works by patching the built-in socket class on runtime.

Example code:

import IOCP_support
IOCP_support.register()
import select

iocp = select.IOCP()

iocp.register(my_socket)
iocp.register(my_pipe)
iocp.register(my_named_pipe)
iocp.register(my_any_fd)
iocp.register(my_directory_watcher)

fd = iocp.poll()

iocp.unregister(anything_registered)

IOCP appears in the select module just like epoll and kqueue would appear.

Don't forget to close iocp before deleting it, otherwise it won't be collected by the GC.

iocp.close()
del iocp

About

Automatically exported from code.google.com/p/python-iocp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages