1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
-
+
+
-
-
-
+
-
-
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
|
Originally at http://wiki.tcl.tk/2701, originally at SF. Belongs here.
**TODO**: Reformat for Fossil Wiki Markup, or Markdown.
Currently in Tcler's Wiki Markup Format.
```
HOWTO
A. Kupries
TclIODriver Andreas Computer Laboratories
(Me, myself and I)
November 14, 2000
```
!!!!!!
'''The Tcl I/O system as seen by a driver (channel type)'''
!!!!!!
**Abstract**
# Abstract
!!!!!!
''This document describes the I/O system used in the Tcl core as it is seen from a driver implementing a channel type.''
This document describes the I/O system used in the Tcl core as it is seen from a driver implementing a channel type.
!!!!!!
**Table of Contents**
```
1. '''Introduction''' . . . . . . . . . . . . . . . . . . . . . . . 2
2. '''Main facilities in the core''' . . . . . . . . . . . . . . . 3
# Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 2
3. '''Writing a channel driver''' . . . . . . . . . . . . . . . . . 5
3.1 '''InstanceData''' . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 '''Creation of channels''' . . . . . . . . . . . . . . . . . . . 6
3.2.1 '''Creation of a base channel''' . . . . . . . . . . . . . . . . 6
3.2.2 '''Creation of a transformation''' . . . . . . . . . . . . . . . 7
3.3 '''Destruction of channels''' . . . . . . . . . . . . . . . . . 7
2. Main facilities in the core . . . . . . . . . . . . . . . 3
3.4 '''Accessing the channel downstream''' . . . . . . . . . . . . . 8
3.5 '''The driver in detail''' . . . . . . . . . . . . . . . . . . . 8
3.5.1 '''GetHandleProc''' . . . . . . . . . . . . . . . . . . . . . . 11
3.5.2 '''SetOptionProc''' . . . . . . . . . . . . . . . . . . . . . . 11
3.5.3 '''GetOptionProc''' . . . . . . . . . . . . . . . . . . . . . . 12
3.5.4 '''SeekProc''' . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.5 '''BlockModeProc''' . . . . . . . . . . . . . . . . . . . . . . 16
3.5.6 '''CloseProc''' . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5.7 '''InputProc''' . . . . . . . . . . . . . . . . . . . . . . . . 18
3.5.8 '''OutputProc''' . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5.9 '''WatchProc''' . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5.10 '''HandlerProc''' . . . . . . . . . . . . . . . . . . . . . . . 24
3. Writing a channel driver . . . . . . . . . . . . . . . . . 5
3.1 InstanceData . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Creation of channels . . . . . . . . . . . . . . . . . . . 6
3.2.1 Creation of a base channel . . . . . . . . . . . . . . . . 6
3.2.2 Creation of a transformation . . . . . . . . . . . . . . . 7
3.3 Destruction of channels . . . . . . . . . . . . . . . . . 7
3.4 Accessing the channel downstream . . . . . . . . . . . . . 8
3.5 The driver in detail . . . . . . . . . . . . . . . . . . . 8
3.5.1 GetHandleProc . . . . . . . . . . . . . . . . . . . . . . 11
3.5.11 '''FlushProc''' . . . . . . . . . . . . . . . . . . . . . . . . 25
'''References''' . . . . . . . . . . . . . . . . . . . . . . . . 26
'''Author's Address''' . . . . . . . . . . . . . . . . . . . . . 29
A. '''Glossary''' . . . . . . . . . . . . . . . . . . . . . . . . . 30
B. '''Acknowledgements''' . . . . . . . . . . . . . . . . . . . . . 31
```
3.5.2 SetOptionProc . . . . . . . . . . . . . . . . . . . . . . 11
3.5.3 GetOptionProc . . . . . . . . . . . . . . . . . . . . . . 12
3.5.4 SeekProc . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.5 BlockModeProc . . . . . . . . . . . . . . . . . . . . . . 16
3.5.6 CloseProc . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5.7 InputProc . . . . . . . . . . . . . . . . . . . . . . . . 18
3.5.8 OutputProc . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5.9 WatchProc . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5.10 HandlerProc . . . . . . . . . . . . . . . . . . . . . . . 24
3.5.11 FlushProc . . . . . . . . . . . . . . . . . . . . . . . . 25
References . . . . . . . . . . . . . . . . . . . . . . . . 26
Author's Address . . . . . . . . . . . . . . . . . . . . . 29
A. Glossary . . . . . . . . . . . . . . . . . . . . . . . . . 30
B. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 31
**1. Introduction**
# 1. Introduction
The main concept of the I/O system used by the Tcl core is the abstract notion
of channels unifying different paths for communication and the accompanying
split of this subsystem into two layers, one generic in nature, the other
handling the specialities of the various communication channels.
It is this second layer which is the home of the drivers implementing channel
|
| ︙ | | |
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
-
+
|
semantics) differ considerably between the various versions of the core and
while documenting the differences is not impossible (only tedious) I am
currently not in the mood for this boring task. People who want to know how to
support a transformation across version are hereby directed to take a look at
the Trf[http://www.purl.org/NET/akupries/soft/trf/] extension and the various
compile-time and run-time tricks and decisions to do so.
**2. Main facilities in the core**
# 2. Main facilities in the core
The main entrance to understanding a channel driver is the
Tcl_ChannelType[http://www.tcl.tk/man/tcl8.4/TclLib/CrtChannel.htm#M6]
structure as it lists all the functionality a driver has to implement for a
correct integration into the (I/O) core.
These function vectors will be later explained in Section 3.5
|
| ︙ | | |
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
-
+
-
+
|
1. Events posted by a channel are always filtered through all the channels above before being handed to channel handlers, either in C or in Tcl. All channels the event is passing through are allowed to absorb it in the process of their own work. This means that transformations are allowed and able to talk to and negotiate in an asynchronous manner with their counterpart on the other side of their channel before allowing the higher layers their turn with respect to events. An example of a transformation requiring such a facility is the implementation of the TLS/SSL protocol[http://www.sensus.org/tcl/] which has to set up the secure channel before allowing the normal communication.
1. The above also implies that the topmost channel in a stack is always notified last.
1. A transformation channel automatically starts out with the same blocking mode as the channel it replaces.
**3. Writing a channel driver**
# 3. Writing a channel driver
***3.1 InstanceData***
## 3.1 InstanceData
Whenever a channel is created the core will not only get a reference to the
structure containing the references to the driver procedures, i.e. the channel
type, but a reference to a structure allocated by the caller as well. This
reference is given to all driver procedures when called for that particular
channel. The internals of this structure are known only to the channel driver;
the core will just pass the reference around. This allows us to associate the
|
| ︙ | | |
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
-
+
-
+
|
''Tcl_TimerToken timer'';: Such a timer is necessary if the driver is able to buffer processed data the generic I/O layer has no knowledge of. It will be used to flush out such data. See Section 3.5.9 for more explanations. Transformations usually do such buffering.
''int flags'';: Transformations have to remember the current blocking mode to handle EOF on input right. See Section 3.5.7 for more explanations. Base channels on the other hand usually don't have a need for this as they can propagate this information to the operating system. An exception are channel types like memchan[http://www.purl.org/NET/akupries/soft/memchan/] which hold all their information in memory.
''int mask'';: Transformations have to remember the current interest in events; see Section 3.5.9 for more explanations. Other channel types may use this too to detect and skip calls which do not change the mask.
***3.2 Creation of channels***
## 3.2 Creation of channels
Every channel has to have a creation command at the tcl level and an
equivalent procedure at the C-level. Depending on the type of the channel the
procedure has to use either
Tcl_CreateChannel[http://www.tcl.tk/man/tcl8.4/TclLib/CrtChannel.htm] or
Tcl_StackChannel[http://www.tcl.tk/man/tcl8.4/TclLib/ChnlStack.htm] to create
and configure the generic part of the new channel. These two cases are
described in the next two subsections.
****3.2.1 Creation of a base channel****
### 3.2.1 Creation of a base channel
The main call to create a new base channel is
Tcl_CreateChannel[http://www.tcl.tk/man/tcl8.4/TclLib/CrtChannel.htm]. Before
doing it the channeltype-specific creation procedure has to
* process its arguments for possible options,
|
| ︙ | | |
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
|
-
+
|
return TCL_OK;
}
```
The ''chan_type'' in the code above is the structure containing the
references to the driver procedures for the base channel.
****3.2.2 Creation of a transformation****
### 3.2.2 Creation of a transformation
In contrast to base channel types the creation procedure must not use
Tcl_CreateChannel[http://www.tcl.tk/man/tcl8.4/TclLib/CrtChannel.htm] as that
would create a new and separate channel, but use
Tcl_StackChannel[http://www.tcl.tk/man/tcl8.4/TclLib/ChnlStack.htm]
instead. This procedure takes as one of its parameters a reference to an
existing channel and creates a new channel structure holding the state of the
|
| ︙ | | |
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
|
-
+
|
return TCL_OK;
}
```
The ''trans_type'' in the code above is the structure containing the
references to the driver procedures for the transformation.
***3.3 Destruction of channels***
## 3.3 Destruction of channels
Destruction of channels is done with either
Tcl_UnregisterChannel[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M11]
or Tcl_UnstackChannel[http://www.tcl.tk/man/tcl8.4/TclLib/ChnlStack.htm]. Both
of them can be called with any channel and will always compensate if the
channel was part of a stack. The first always destroys all channels in a
stack, from top to bottom, whereas the second will always destroy just the
|
| ︙ | | |
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
|
-
+
-
+
-
+
|
from a channel. This may change in the future as some of the required
mechanism are already in place in the core, internally.
Whatever way was used to destroy a channel, the system will call the Section
3.5.6 of the transformation so that its driver may cleanup its data
structures.
***3.4 Accessing the channel downstream***
## 3.4 Accessing the channel downstream
This section is relevant to transformations, but nothing else.
To accesss the channel below itself a driver just has to call
Tcl_GetStackedChannel[http://www.tcl.tk/man/tcl8.4/TclLib/ChnlStack.htm] with
the token of its own channel (the backlink we talked about in Section
3.1). The function will return the token for the channel we want. A
(Tcl_Channel) NULL indicates that the channel used as argument was at the
bottom of the stack.
***3.5 The driver in detail***
## 3.5 The driver in detail
Now that the environment of the driver is a little more known we can explain
the operations of the various driver procedures in detail. Every description
will start with the general condition under which the procedure is called by
the generic I/O layer of the tcl core and proceeds to the specialities a
transformation has to take care of.
But before we come to this we have to talk about driver versions as well. The
core currently supports version 1 and version 2 drivers. The latter was
introduced with Tcl 8.3.2, during the second rewrite of the stacked channel
stuff. It was required as for some functionality new vectors were needed to
correctly support it and the core also had to had a way to determine wether
the new fields were valid or not and just accessing them is out of the
question as the older structures simply don't have them, i.e. we would get
random information and most likely crash later oon.
The structure for a channel type looks like this:
'''Tcl_ChannelType definition'''
```
```
typedef struct Tcl_ChannelType {
char *typeName; /* The name of the channel type in Tcl
* commands. This storage is owned by
* the channel type. */
Tcl_ChannelTypeVersion version; /* Version of the channel type. */
Tcl_DriverCloseProc *closeProc; /* Procedure to call to close the
* channel, or TCL_CLOSE2PROC if the
|
| ︙ | | |
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
|
-
+
|
*/
Tcl_DriverFlushProc *flushProc; /* Procedure to call to flush a
* channel. May be NULL. */
Tcl_DriverHandlerProc *handlerProc; /* Procedure to call to handle a
* channel event. This will be passed
* up the stacked channel chain. */
} Tcl_ChannelType;
```
```
For this discussion are only the four fields 'version', 'blockModeProc',
'flushProc' and 'handlerProc' of relevance.
All possible values are acceptable for 'version', but 'TCL_CHANNEL_VERSION_1'
and 'TCL_CHANNEL_VERSION_2' are special as they explictly spell out the
version of the driver. Any other value will cause the system to assume that
|
| ︙ | | |
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
|
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
|
-
+
-
+
|
When writing a base channel it is on the other hand recommended to use a
version 1 driver as that version will support all versions of the core with
the least hassle involved. Because of this reasoning it is also recommended
not to use 'TCL_CHANNEL_VERSION_1' but to define the version implicitly,
i.e. to store 'blockModeProc' in that field. Usage of 'TCL_CHANNEL_VERSION_1'
would again restrict the driver to 8.3.2 and beyond.
****3.5.1 GetHandleProc****
### 3.5.1 GetHandleProc
This procedure is called by the C-API function
Tcl_GetChannelHandle[http://www.tcl.tk/man/tcl8.4/TclLib/CrtChannel.htm] to
retrieve the OS specific handle associated to the queried channel.
Channel types implementing communication paths independent of the OS, like
memchan[http://www.purl.org/NET/akupries/soft/memchan/], have to return a NULL
handle (erroring out is not possible).
Transformations don't need to bother with this function. The generic layer
will always query the bottom most channel in a stack as that is the only one
which can have OS specific handles. In other words, transformations are never
queried for this information.
****3.5.2 SetOptionProc****
### 3.5.2 SetOptionProc
This procedure is called by the generic I/O layer whenever
Tcl_SetChannelOption[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M21]
is used (for example by 'fconfigure') and a non-standard option was specified
as argument.
For base channel the handling is straight forward. If there are no options to
|
| ︙ | | |
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
|
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
|
-
+
|
return TCL_ERROR;
}
return setOptionProc(Tcl_GetChannelInstanceData(parent),
interp, optionName, value);
}
```
****3.5.3 GetOptionProc****
### 3.5.3 GetOptionProc
This procedure is called by the generic I/O layer whenever
Tcl_GetChannelOption[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M20]
is used (f.e. by 'fconfigure') to query the value of a non-standard (or all)
option(s).
The channel type has to implement everything from Section 3.5.2 and some more.
|
| ︙ | | |
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
|
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
|
-
+
|
}
```
P.S. Given the similarities in the way the delegation is handled by the two
branches of the if statement above it makes sense to factor this code into a
separate procedure.
****3.5.4 SeekProc****
### 3.5.4 SeekProc
This procedure is called by the generic I/O layer whenever the user asks the
channel to move or query the 'file access point'. The respective public
entries for these functions are
Tcl_Seek[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M18] and
Tcl_Tell[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M19]. The tell
functionality is requested by 'mode == SEEK_CUR' and 'offset == 0'.
|
| ︙ | | |
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
|
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
|
-
+
|
}
```
As a last note, Trf[http://www.purl.org/NET/akupries/soft/trf/] implements a
much more complex seeking model for transformations, but describing it is
beyond the scope of this document. Go to its documentation instead.
****3.5.5 BlockModeProc****
### 3.5.5 BlockModeProc
This procedure is called by the generic I/O layer whenever
Tcl_SetChannelOption[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M21]
is used (for example by 'fconfigure') and a '-blocking' was specified as the
name of the option.
For a base channel this procedure has to take the necessary actions at the OS
|
| ︙ | | |
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
|
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
|
-
+
|
clientdata->flags |= ASYNC;
} else {
clientdata->flags &= ~ASYNC;
}
}
```
****3.5.6 CloseProc****
### 3.5.6 CloseProc
This procedure is called by generic the I/O layer to tell a channel that it is
about to be destroyed. See Section 3.3 for the procedures which can invoke it.
It is the responsibility of the procedure to clean up any data structures held
by the channel. Another task is the removal of all event related things, like
ChannelHandlers and Timers, although this could be billeted under 'clean up of
|
| ︙ | | |
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
|
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
|
-
+
|
return TCL_OK
}
```
The part marked with '''|''' is specific to transformations and not required
for a base channel.
****3.5.7 InputProc****
### 3.5.7 InputProc
This procedure is called by the generic I/O layer whenever some input is
required. Entrypoints which can cause this are
Tcl_Read[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M13],
Tcl_ReadChars[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M13],
Tcl_Gets[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M14] and
Tcl_GetsObj[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M14].
|
| ︙ | | |
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
|
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
|
-
+
|
* Splitter: Identity transformation piping the information
flowing through it to a second channel (different from the
channel downstream).
* Recursively reading from/writing to the transformation itself (maybe indirectly, see splitter) is not a good idea, it may lead to infinite looping.
****3.5.8 OutputProc****
### 3.5.8 OutputProc
This procedure is called by the generic I/O layer whenever something is
written to the channel and an I/O buffer in the generic layer is
flushed. Entrypoints which can cause this are
Tcl_Write[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M16],
Tcl_WriteChars[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M16] and
Tcl_WriteObj[http://www.tcl.tk/man/tcl8.4/TclLib/OpenFileChnl.htm#M16].
|
| ︙ | | |
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
|
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
|
-
+
|
If there is data which cannot be converted at once it has to be buffered
internally, for conversion by future write requests, together with the data
written by these calls.
As with InputProc (Section 3.5.7) this procedure is free to read from the
underlying channel too, or from some other channel, or ...
****3.5.9 WatchProc****
### 3.5.9 WatchProc
This procedure is called by the generic I/O layer whenever the user (or the
system) announces its (dis)interest in events on the channel. It is called
throughout the system, for example when channel handlers are added to and
removed from a channel, or after the execution of channelhandlers (as they may
change the interest).
|
| ︙ | | |
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
|
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
|
-
+
|
1. Why? Because the socket has an EOF pending and will not generate events anymore. and the generic layer has empty buffers and ceases to generate events too. It has no knowledge about the buffers inside the driver, i.e the transformation. So the script will not wake up again, neither ask for the line, nor detect the pending EOF. We are hung.
The solution to this lock is the same one used by the generic layer, but from
the inside of the transformation this time:
: The transformation has to check itself for data waiting to be read and then use a timer to generate the necessary 'readable' events. And that is what the timer shown in the WatchProc will do.
****3.5.10 HandlerProc****
### 3.5.10 HandlerProc
This vector is the second part of the integration of transformations with the
notifier. It is called by the generic layer whenever an event happens at the
channel downstream. This also means that it is never called for the channel at
the bottom of a stack. In other words, base channels don't have to implement
this function.
|
| ︙ | | |
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
|
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
|
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
|
uses this facility to handle the whole negotiation phase. Only after the
encryption is setup events are passed unchanged to the higher layers.
'''HandleProc skeleton'''
```
static int HandleProc(clientdata, mask) {
''/*''
'' * An event occured in the underlying channel. This''
'' * transformation doesn't process such events thus''
'' * returns the incoming mask unchanged.''
/*
* An event occured in the underlying channel. This
* transformation doesn't process such events thus
* returns the incoming mask unchanged.
'' *''
'' * We do delete an existing timer. It was not fired,''
'' * yet we are here, so the channel below generated''
'' * such an event and we don't have to. The renewal of''
'' * the interest after the execution of channel''
'' * handlers will eventually cause us to recreate the''
'' * timer''
'' */''
*
* We do delete an existing timer. It was not fired,
* yet we are here, so the channel below generated
* such an event and we don't have to. The renewal of
* the interest after the execution of channel
* handlers will eventually cause us to recreate the
* timer
*/
''... kill timer''
... kill timer
return interestMask;
}
```
****3.5.11 FlushProc****
### 3.5.11 FlushProc
This vector is currently not used by the generic layer of the I/O system. In
the future it might be used to separate the actions of flushing and writing
data.
**Author's Address**
# Author's Address
Andreas Kupries
Andreas Computer Laboratories (Me, myself and I)
EMail: [email protected]
**Appendix A. Glossary**
# Appendix A. Glossary
A little glossary of terms used in the paper, but so far without much of an
explanation (or none).
Tcl_Channel: An opaque token for channels, and used by all interfaces accessing channels. Internally it is a pointer to the relevant data structures (Channel*).
stack: If one or more transformations are stacked upon an arbitrary other channel I use this word to refer to the whole group of channels.
(un)cover: Placing a transformation on a channel C "covers" C, removing the transformation "uncovers" it again.
**Appendix B. Acknowledgements**
# Appendix B. Acknowledgements
This HOWTO was written in XML using the DTD developed by [Marshall T. Rose]
for writing RFC's and I-D's, see [RFC]
2629[http://www.rfc-editor.org/rfc/rfc2629.txt], and converted to text and
HTML with his tool, ''[xml2rfc]''.
|