There are some articles about the IO subsystem of Tcl at SourceForge [L1 ]. Unfortunately one of the articles encounters a size limit imposed by SF. The text version of this article is now here on the Wiki:
The second article is not truncated. It might still make sense to put it here nevertheless, to have everything together.
For examples see Channel Implementations.