[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
tcl::chan::halfpipe(n) 1 tcllib "Reflected/virtual channel support"
tcl::chan::halfpipe - In-memory channel, half of a fifo2
The tcl::chan::halfpipe package provides a command creating one half of a tcl::chan::fifo2 pair. Writing into such a channel invokes a set of callbacks which then handle the data. This is similar to a channel handler, except having a much simpler API.
- ::tcl::chan::halfpipe ?-option value...?
This command creates a halfpipe channel and configures it with the callbacks to run when the channel is closed, data was written to it, or ran empty. See the section Options for the list of options and associated semantics. The result of the command is a list containing two elements, the handle of the new channel, and the object command of the channel handler, in this order. The latter is supplied to the caller to provide her with access to the put method for adding data to the channel.
Two halfpipes with a bit of glue logic in the callbacks make for one tcl::chan::fifo2.
- objectCmd put bytes
This method of the channel handler object puts the data bytes into the channel so that it can be read from it.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category virtchannel of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.
Copyright © 2009 Andreas Kupries <email@example.com>