[chan available]: TIP 287 patch available

(Printer friendly version)

Thursday I authored TIP 287 which proposes adding a [chan available] command to Tcl 8.5. This command would allow programmers at the Tcl level to introspect how much input is currently buffered & available to be read on a channel.

This command would be very useful to proactively avoid a potential class of DoS attacks on network daemons implementing line-oriented protocols (such as HTTP, SMTP, etc.)

This afternoon I finished my patch to implement the proposed functionality and uploaded it to SourceForge (TCL RFE #1586860).

I expect this TIP to be totally non-controversial and hope that the TCT will vote on it (and accept it! :-) prior to the December 1st feature freeze for Tcl 8.5.

—Michael A. Cleverly

Comments

Matt: [ mail | www | link ]

You are awesome. Keep up the good work.

Mon, 30 Oct 2006, 11:11

Dossy Shiobara: [ mail | www | link ]

Not to rain on your parade or anything, but how does [chan available] differ from [fconfigure channelId -queue] ?

Mon, 30 Oct 2006, 20:58

Michael A. Cleverly: [ mail | www | link ]

Dossy, I haven't encountered a version of Tcl that has an [fconfigure channelId -queue] . It isn't listed in the 8.4 or 8.5 man pages.

powerbook:~/sandbox/bin michael$ ./tclsh8.5
% info patchlevel
8.5a5
% set sock [socket www.tcl.tk 80]
sock5
% fconfigure $sock -queue
bad option "-queue": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -peername, or -sockname
% fconfigure $sock
-blocking 1 -buffering full -buffersize 4096 -encoding utf-8 -eofchar {{} {}} -translation {auto crlf} -peername {209.17.146.136 tcl.activestate.com 80} -sockname {192.168.1.4 powerbook.home.cleverly.com 51815}

I suppose you could have a custom channel driver extension that implemented a -queue option, but I'm not familiar with (or remembering) one that does...

Mon, 30 Oct 2006, 21:57

Dossy Shiobara: [ mail | www | link ]
$ tclsh
% info patchlevel
8.4.12
% fconfigure stdin -queue
0 0
% fconfigure stdout -queue
0 0
% set fd [socket www.tcl.tk 80]
sock5
% fconfigure $fd -queue
bad option "-queue": should be one of -blocking, -buffering, -buffersize, -encoding,
-eofchar, -translation, -peername, or -sockname
Hmm. I wonder why -queue is available on stdin and stdout, but not file channels returned from [socket].

Tue, 31 Oct 2006, 16:12

Michael A. Cleverly: [ mail | www | link ]
I'm happy to note that a revised version of my tip was accepted in time to be included in Tcl 8.5.

Tue, 05 Dec 2006, 20:57

Looky: [ mail | www | link ]
If you are looking to buy a baby pug, Black and white pugs, Mini pug puppies for sale, Black and tan pug for sale, Teacup pug puppies for sale, Female pug puppies, pug puppies for sale, pug puppies for sale near me, pug puppies for sale under $500 near me. Pug Puppies for Sale Near Me pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under $500 Near Me pug puppies for sale in texas pug puppies for sale $200 pugs for sale near me under $500 pugs for sale under $400 near me pugs for sale near me puppies for sale near me under $500 pug puppies for sale under $1,000 near me pug for sale pug puppies for sale under $300 Brindle Pug Pitbull Pug Mix Pugs for sale cheap Cheap pug affordable pug puppies for sale near me black pugs for sale near me White Pugs for sale pug dog for sale free pug puppies pug puppies for sale in my area mn pug breeders pug puppies indiana pugs for sale michigan PUG PUPPY ADOPTION Pug puppies for sale Pug puppies for sale near me Pug puppies near me Pug Puppies for Sale Under $500 Near Me Cute Pug Puppies Black pug puppies Black pug puppies for sale pug puppies for adoption black pug puppies for sale near me chihuahua pug mix puppies how much is a pug puppy teacup pug puppies baby pug puppies baby pug puppies for sale pictures of pug puppies pug puppies for sale in Ohio pug puppies price pug mix puppies teacup pug puppies for sale best food for pug puppy newborn pug puppies pug puppies craigslist pug puppies for sale craigslist adorable pug puppies how much does a pug puppy cost Pitbull pug mix puppies pug pit mix puppy pug puppies for sale $200 pug puppies for sale in NJ Pug puppies for sale in Wisconsin pug puppy cost pug puppy food royal canin pug puppy royal canin pug puppy food fawn pug puppy pug puppies for sale florida pug puppies for sale in Indiana pug puppies for sale in KY pug puppies for sale in NC pug dog puppy AKC Registered Pug Puppies For sale cheap pug puppies for sale near me cheap pug puppies for sale in California cheap pug puppies for sale in nj Black Pug Puppies for sale pugs puppies for sale

Thu, 10 Nov 2022, 05:32

Leave a comment

Name:  
Email: (optional)
URL: (optional)

Your comment: