SYNOPSIS
#include <tcl.h>
Tcl_Channel Tcl_StackChannel(interp, typePtr, clientData, mask, channel)
int Tcl_UnstackChannel(interp, channel)
Tcl_Channel Tcl_GetStackedChannel(channel)
ARGUMENTS
- Tcl_Interp *interp (in)
-
Interpreter for error reporting
- can be NULL. - Tcl_ChannelType *typePtr (in)
-
The new channel I/O procedures to use for channel.
- ClientData clientData (in)
-
Arbitrary one-word value to pass to channel I/O procedures.
- int mask (in)
-
Conditions under which channel will be used: OR-ed combination of TCL_READABLE, TCL_WRITABLE and TCL_EXCEPTION. This can be a subset of the operations currently allowed on channel.
- Tcl_Channel channel (in)
-
An existing Tcl channel such as returned by
Tcl_CreateChannel() .
DESCRIPTION
These functions are for use by extensions that add processing layers to Tcl I/O channels. Examples include compression and encryption modules. These functions transparently stack and unstack a new channel on top of an existing one. Any number of channels can be stacked together.
The implementation of the Tcl channel code was rewritten in 8.3.2 to
correct some problems with the previous implementation with regard to
stacked channels. Anyone using stacked channels or creating stacked
channel drivers should update to the new TCL_CHANNEL_VERSION_2
Tcl_ChannelType structure. See
The mask parameter specifies the operations that are allowed on
the
new channel. These can be a subset of the operations allowed on the
original channel. For example, a read-write channel may become read-only
after the
Closing a channel closes the channels stacked below it. The close of stacked channels is executed in a way that allows buffered data to be properly flushed.
PORTABILITY
Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Commands:
- vwait
- Functions:
Notifier() ,Tcl_CreateChannel() ,Tcl_OpenFileChannel()
PTC MKS Toolkit 10.4 Documentation Build 39.