Re: Advice, please, on creating a new channel type (I think)
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Advice, please, on creating a new channel type (I think)

From: Christopher Nelson <cnelson@nycap.rr.com>
Date: Tue May 24 2005 - 22:27:27 CEST

Christopher Nelson wrote:
> Michael Schlenker wrote:
> > Christopher Nelson wrote:
> > > I need to create a Tcl extension to access ethernet ports that
> > > have some unusual hardware managing them. ... If someone
> > > here who's familiar with the code could give me a pointer ...
> > > I'd sure appreciate it.
> > >
> > >
> > Maybe this helps as a starting point:
> >
> http://sourceforge.net/docman/display_doc.php?docid=1791&group_id=10894
>
> That looks very promising. Thanks.

OK. I've got a very rough implementation that seems to kind of do
something. It creates a channel that I can pass to [fileevent] and
have it call the handler. However, the channel seems to be constantly
readable with 0 bytes available most of the time. Can someone help me
understand how the readable attribute is set? I have a specific
complication that may or may not be relevant. I need to open a raw
socket and filter some or most of the data that comes in on it. Thus,
most of the time when the underlying socket is readable, my channel
should not be. I was imagining that one of the things I used to set up
a channel was responsible for telling the channel framework, "Yes, I
really have data now" but I'm not seeing it. Maybe it's just late and
I've got my stoopid hat on.
Received on Thu Sep 29 14:18:45 2005