Tcl_CreateChannelHandler

Schedule a callback to be made from the Tcl event loop when a channel is in a particular state (i.e. readable or writable). The foundation for fileevent.
https://www.tcl-lang.org/man/tcl8.6/TclLib/CrtChnlHdlr.htm