interface documentation
Implement me to be able to use IFileDescriptor type resources.
This assumes that your main-loop uses UNIX-style numeric file descriptors (or at least similarly opaque IDs returned from a .fileno() method)
| Method | add |
I add reader to the set of file descriptors to get read events for. |
| Method | add |
I add writer to the set of file descriptors to get write events for. |
| Method | get |
Return the list of file descriptors currently monitored for input events by the reactor. |
| Method | get |
Return the list file descriptors currently monitored for output events by the reactor. |
| Method | remove |
Remove all readers and writers. |
| Method | remove |
Removes an object previously added with addReader. |
| Method | remove |
Removes an object previously added with addWriter. |
I add reader to the set of file descriptors to get read events for.
| Parameters | |
reader:IReadDescriptor | An IReadDescriptor provider that will be checked for read events until it is removed from the reactor with removeReader. |
I add writer to the set of file descriptors to get write events for.
| Parameters | |
writer:IWriteDescriptor | An IWriteDescriptor provider that will be checked for write events until it is removed from the reactor with removeWriter. |
Return the list of file descriptors currently monitored for input events by the reactor.
| Returns | |
List[ | the list of file descriptors monitored for input events. |
Return the list file descriptors currently monitored for output events by the reactor.
| Returns | |
List[ | the list of file descriptors monitored for output events. |
Remove all readers and writers.
Should not remove reactor internal reactor connections (like a waker).
| Returns | |
List[ | A list of IReadDescriptor and IWriteDescriptor providers which were removed. |