diff options
Diffstat (limited to 'doc/chan.n')
-rw-r--r-- | doc/chan.n | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.11 2007/10/24 14:29:38 dkf Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.12 2007/10/25 14:07:32 dkf Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -293,7 +293,9 @@ Note that \fIinputChan\fR can become readable during a background copy. You should turn off any \fBchan event\fR or \fBfileevent\fR handlers during a background copy so those handlers do not interfere with the copy. Any I/O attempted by a \fBchan event\fR or -\fBfileevent\fR handler will get a "channel busy" error. +\fBfileevent\fR handler will get a +.QW "channel busy" +error. .PP \fBChan copy\fR translates end-of-line sequences in \fIinputChan\fR and \fIoutputChan\fR according to the \fB\-translation\fR option for @@ -333,7 +335,11 @@ the channel. .PP The argument \fImode\fR specifies if the new channel is opened for reading, writing, or both. It has to be a list containing any of the -strings "\fBread\fR" or "\fBwrite\fR". The list must have at least one +strings +.QW "\fBread\fR" +or +.QW "\fBwrite\fR" . +The list must have at least one element, as a channel you can neither write to nor read from makes no sense. The handler command for the new channel must support the chosen mode, or an error is thrown. @@ -498,7 +504,11 @@ only those channel names that match it (according to the rules of .TP \fBchan pending \fImode channelId\fR . -Depending on whether \fImode\fR is "input" or "output", returns the number of +Depending on whether \fImode\fR is +.QW "input" +or +.QW "output" , +returns the number of bytes of input or output (respectively) currently buffered internally for \fIchannelId\fR (especially useful in a readable event callback to impose application-specific limits on input line lengths to avoid @@ -512,7 +522,10 @@ This subcommand is used by command handlers specified with \fBchan create\fR. It notifies the channel represented by the handle \fIchannelId\fR that the event(s) listed in the \fIeventSpec\fR have occurred. The argument has to be a list containing any of the strings -"\fBread\fR" and "\fBwrite\fR". The list must contain at least one +.QW "\fBread\fR" +and +.QW "\fBwrite\fR" . +The list must contain at least one element as it does not make sense to invoke the command if there are no events to post. .RS |