From: Matt S Trout Date: Wed, 15 Aug 2012 12:50:10 +0000 (+0000) Subject: scratch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=scratch;p=scpubgit%2FTenDotTcl.git scratch --- diff --git a/ten/pkgIndex.tcl b/ten/pkgIndex.tcl index 6cfd726..03bdb38 100644 --- a/ten/pkgIndex.tcl +++ b/ten/pkgIndex.tcl @@ -1,2 +1,3 @@ package ifneeded ten 0.0.1 [list source [file join $dir ten.tcl]] package ifneeded ten::test 0.0.1 [list source [file join $dir test.tcl]] +package ifneeded ten::json 0.0.1 [list source [file join $dir json.tcl]] diff --git a/ten/ten.tcl b/ten/ten.tcl index 0e22d50..0dec336 100644 --- a/ten/ten.tcl +++ b/ten/ten.tcl @@ -50,7 +50,16 @@ snit::type ten::connection { method send {message_type args} { set future [ten::future %AUTO%] - set call_args [concat $message_type $future $args] + $self Send [concat + [list list "str $message_type" "str $future"] $args + ] + } + + method Send {to_send} { + puts $options(-send_to_fh) [$self Serialize $to_send] + } + + method Serialize { } }