summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-12-01 15:55:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-12-01 15:55:43 (GMT)
commit986958b3d40c8667b6f7232cd0d7d7c6987014a6 (patch)
treee4a04cf8dde40fdd70f655a5519108dcd36b9f83 /doc
parent84e12e85c42e0e68ff5aa6b331aa0d53962f7c5a (diff)
downloadtcl-986958b3d40c8667b6f7232cd0d7d7c6987014a6.zip
tcl-986958b3d40c8667b6f7232cd0d7d7c6987014a6.tar.gz
tcl-986958b3d40c8667b6f7232cd0d7d7c6987014a6.tar.bz2
TIP#287 IMPLEMENTATION
* doc/chan.n: New subcommand [chan pending]. * generic/tclBasic.c: Thanks to Michael Cleverly for proposal * generic/tclInt.h: and implementation. * generic/tclIOCmd.c: * library/init.tcl: * tests/chan.test: * tests/ioCmd.test:
Diffstat (limited to 'doc')
-rw-r--r--doc/chan.n12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/chan.n b/doc/chan.n
index 6b912c1..9e51251 100644
--- a/doc/chan.n
+++ b/doc/chan.n
@@ -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.6 2006/11/16 09:34:17 dkf Exp $
+'\" RCS: @(#) $Id: chan.n,v 1.7 2006/12/01 15:55:44 dgp Exp $
.so man.macros
.TH chan n 8.5 Tcl "Tcl Built-In Commands"
.BS
@@ -493,6 +493,16 @@ Produces a list of all channel names. If \fIpattern\fR is specified,
only those channel names that match it (according to the rules of
\fBstring match\fR) will be returned.
.TP
+\fBchan pending \fImode channelId\fR
+.
+Depending on whether \fImode\fr is "input" or "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
+a potential denial-of-service attack where a hostile user crafts
+an extremely long line that exceeds the available memory to buffer it).
+Returns -1 if the channel was not opened for the mode in question.
+.TP
\fBchan postevent \fIchannelId eventSpec\fR
.
This subcommand is used by command handlers specified with \fBchan