X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ten%2Ften.tcl;fp=ten%2Ften.tcl;h=988915d790d6d72a250e97f37d60b15df9c7786b;hb=2cecba5d55ca5249b4c3bbc4b388ddf85d739f72;hp=3abe93183646f5574f695d960d09eebb57fcd935;hpb=e63453e3095c682598081c24430cf087a850a30e;p=scpubgit%2FTenDotTcl.git diff --git a/ten/ten.tcl b/ten/ten.tcl index 3abe931..988915d 100644 --- a/ten/ten.tcl +++ b/ten/ten.tcl @@ -249,4 +249,17 @@ snit::type ten::read_channel { } } +snit::type ten::handle { + option -connection + option -id + + method call {name args} { + return [[$self start $name {*}$args] await_get] + } + + method start {name args} { + $options(-connection) send call [json::write string $options(-id)] 0 [json::write string $name] {*}$args + } +} + package provide ten 0.0.1