I was wondering if there is a way in tcl (or an extension),
that would allow me to create a "channel" without any underlying
socket or file.
Sort of an internal pipe?
I know that I could probably achieve what I want via a
socket or temporary file but I was wondering if there is a
mechanism for creating a "internal" tcl pipe.
Background:
What I was thinking of doing is a simple RTP application.
(For testing only)
To do this I would need to receive a RTP data (containing
uLaw audio), strip the RTP header off then feed the uLaw
data to the snack sound object connected to a channel,
which would then play the audio.
Regards
Paul
yes it is possible.
In tcl 8.4 you can create such a fake channel with the C-API of tcl
(Tcl_CreateChannel, etc).
In tcl 8.5 you can create a new channel in tcl itself using the new tcl
command chan, and using the C-API of tcl like in tcl 8.4.
If you create a fake channel using the C-API, than you have to provide
a channel type structure with function pointers, which have to care for
configuring, reading, writing, seeking, flushing, etc.. Those functions
are responsible for the fake channel behaviour.
About using the new tcl command chan, you have to ask anothers, because
I never have used this command before, but surely will!
Best regards,
Martin Lemburg
UGS - Transforming the Process of Innovation
By the way - what about it? I see no [chan] command in Tcl 8.5 manuals.
Is the documentaction outdated?
--
Pozdrawiam! (Greetings!)
Googie
On my system there is a man-page for [chan]
chan - Read, write and manipulate channels
The chan.n on my system has a ctime of 2005-12-16, so
that's an upper bound as to when it appeared in CVS.
Something in <http://wiki.tcl.tk/memchan> may work for you.
- Adrian
The [chan] command was introduced through TIP#208. I don't know whether
the alpha version of 8.5 you're looking at predates or postdates that
TIP being implemented.
Donal.
the starpack (tclkit) of the version 8.5a4 I use, contains already the
chan command.
But the last documentation I downloaded on the "release" of 8.5a4,
didn't document the chan command.
Probably. But the best/nicest access to online manual pages is at
http://tmml.sourceforge.net/coredocs.html
and it does list [chan]:
http://tmml.sourceforge.net/doc/tcl/chan.html
These are the man pages from CVS, updated every [whoKnows]
miguel
the man page at ...
http://tmml.sourceforge.net/doc/tcl/chan.html
... didn't contain e.g. the subcommands create and postevent, so far
... I don't know how current this man page is.
Best regards
That's not an official release, even of an alpha. By that, I mean that
there's no core-8-5-a4 tag in CVS. We make no promises about doc
consistency outside of release points.
We ought to do an a4 release soon though. It's been too long since the
last one.
Donal.
That page is up to date with the chan.n file in CVS, but that is in turn
still missing documentation of the create and postevent subcommands.
Pester Andreas Kupries about this!
Donal.
Oops ... you can always download the latest manual page from sf's
interface to cvs (http://cvs.sourceforge.net/viewcvs.py/tcl/tcl/doc/);
in this case
http://cvs.sourceforge.net/viewcvs.py/*checkout*/tcl/tcl/doc/chan.n?rev=1.2
But that does not refer to postevent either - a doc bug?
That looks just the ticket!
I am not quite ready to dive into the bleed edge of 8.5 just yet.
Thanks everyone!
Paul