tcl::t...mitsize(3tcl)

πŸ“¦
version 2.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 (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