{ } qjs-modules

io

Source: lib/io.js (pure JS) — default export: io

File-descriptor read/write handler registration and multiplexing (an event-loop I/O dispatcher).

Exports

ExportArgsKindDescription
setHandler(fd, m, callback)3functionRegisters a read/write (m = READ/WRITE) handler for fd.
setReadHandler(fd, callback)2functionRegisters a read handler (or clears it with null).
setWriteHandler(fd, callback)2functionRegisters a write handler (or clears it with null).
checkFileDescriptor(fd)1functionValidates a descriptor.
Multiplexer—classDispatches registered handlers as descriptors become ready.
DescriptorMap—classArray subtype mapping fds → handler entries.
HandlerEntry—classArray subtype holding the handlers for one fd.
IOReadDecorator, IOWriteDecorator—constMixins adding read/write helpers to streams.
READ, WRITE—constHandler-direction constants (0 / 1).
io—objectThe default I/O dispatcher. (default export)