A '''channel''' is the [Tcl] [I/O] model for character streams. [[why are channels important to the tcl programmer?]] [[how are channels different from other constructs in tcl?]] [[how do I create/use/destroy a channel?]] ** Tcl Features ** [stacked channel]: a channel whose input or output is to/from another channel [reflected channel]: a channel that is implemented at the script level [transform]: describes the behaviour and interface of a stackable channel [virtual channel]: an umbrella term for a channel implemented as a [reflected channel] and/or a [stacked channel] ** Commands ** [chan]: new in [Changes in Tcl/Tk 8.5%|%Tcl/Tk 8.5] [close]: [eof]: [fblocked]: [fconfigure]: [fcopy]: [fileevent]: [flush]: [gets]: [puts]: [read]: [socket]: [tell]: ** Half Bakery: Configurable Atom Type ** [PYK] 2014-05-17: Tcl's channel mechanism currently only supports one type of atom: the byte. Could it be generalized to support arbitrary atom types? This could be put to use anywhere messages a passed, from [flow-based programming] to (gasp) [UDP] implementations. Hypothetical usage: ====== set chan [open {some resource descriptor}] chan configure $chan -atom rfc2822 set msg [read $chan] $msg headers ====== Yes, `[read]` would in this case construct new commands -- groovy eh? ** See Also ** [Channel Implementations]: enumerates all known channels, including those in extensions [Cplusplus streams and Tcl channels]: [Tcl IO Drivers%|%The Tcl I/O system as seen by a driver (channel type)]: <> Arts and crafts of Tcl-Tk programming | Channel | File | Networking | What is Tcl