tcl::t...mitsize(3tcl)
β¨ tcl::transform::limitsize β limiting input β¨
okay bestie, so this is a page from the Reflected/virtual channel support section of the Tcllib docs, and it's literally about putting a cap on how much you can read from a channel π
πΈ SYNOPSIS πΈ
package require Tcl 8.6 9
package require tcl::transform::core ?1.1?
package require tcl::transform::limitsize ?1.1?
::tcl::transform::limitsize chan max
π¦ DESCRIPTION π¦
The tcl::transform::limitsize package hands you a command that builds a channel transformation, and what that transformation does is limit the number of characters you can read from the channel. Basically it's a generator for a fake, artificial EOF, no cap π§’
The internal TclOO class that implements the transform handler is a subclass of the tcl::transform::core framework. slay.
π API π
::tcl::transform::limitsize chan maxβ this command creates a size limiting transformation layered on top of the channel chan and returns its handle. π«Ά
max is the number of bytes which can be read from the channel before EOF is signaled by the transformation.
β οΈ note that popping the transformation clears the EOF it generated as well. iconic but also, like, remember it π
π BUGS, IDEAS, FEEDBACK π
ngl, this document, and the package it describes, will undoubtedly contain bugs and other problems. it's giving "software". π
Please report such in the category virtchannel of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. And please also report any ideas for enhancements you may have for either package and/or documentation β we want all of it, fr fr.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. iykyk π
β KEYWORDS β
channel transformation, limitsize, reflected channel, size limit, tip 230, transformation, virtual channel
π CATEGORY π
Channels
π COPYRIGHT π
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole vibe bestie π this was tcllib version 1.1, the reflected/virtual channel support era, and yeah β tcl::transform::limitsize(3tcl). periodt π§β¨
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms