factor out remote_object method
[scpubgit/TenDotTcl.git] / ten / ten.tcl
index 988915d..fed99af 100644 (file)
@@ -93,6 +93,11 @@ snit::type ten::connection {
     set send_this [ json::write array {*}$to_send ]
     puts $options(-send_to_fh) $send_this
   }
+
+  method remote_object {id} {
+    return [ten::handle %AUTO% -connection $self -id $id]
+  }
+
 }
 
 snit::type ten::future {