This is a protocol for defining a channel transform, which is a way to intercept the reading and writing of bytes on a channel with a Tcl script and modify them (e.g., handling encryption, logging or compression). The script is attached via chan push.
When attached, the initialize method is called to get the list of supported methods (by name). For a reader transform, the relevant methods are read (mandatory for readers), drain and limit?. For a writer transform, the relevant methods are write (mandatory) and flush. Both types must also support finalize (for when the channel is closed or the transform detached with chan pop) and may support clear too.
[replace with details of this command]