1 # Copyright (c) Twisted Matrix Laboratories.
2 # See LICENSE for details.
6 Interfaces for iocpreactor
10 from zope.interface import Interface
14 class IReadHandle(Interface):
15 def readFromHandle(bufflist, evt):
17 Read into the given buffers from this handle.
19 @param buff: the buffers to read into
20 @type buff: list of objects implementing the read/write buffer protocol
22 @param evt: an IOCP Event object
24 @return: tuple (return code, number of bytes read)
29 class IWriteHandle(Interface):
30 def writeToHandle(buff, evt):
32 Write the given buffer to this handle.
34 @param buff: the buffer to write
35 @type buff: any object implementing the buffer protocol
37 @param evt: an IOCP Event object
39 @return: tuple (return code, number of bytes written)
44 class IReadWriteHandle(IReadHandle, IWriteHandle):