From a65255a06d7252614f0061823860568f4aefe1b7 Mon Sep 17 00:00:00 2001 From: oharboe Date: Sat, 12 Jul 2008 07:50:03 +0000 Subject: testing/*.tcl sample & test code git-svn-id: svn://svn.berlios.de/openocd/trunk@798 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- testing/tcl_server.tcl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 testing/tcl_server.tcl (limited to 'testing') diff --git a/testing/tcl_server.tcl b/testing/tcl_server.tcl new file mode 100644 index 0000000..c5ec229 --- /dev/null +++ b/testing/tcl_server.tcl @@ -0,0 +1,15 @@ +# Simple tcl client to connect to openocd +puts "Use empty line to exit" +set fo [socket 127.0.0.1 6666] +puts -nonewline stdout "> " +flush stdout +while {[gets stdin line] >= 0} { + if {$line eq {}} break + puts $fo $line + flush $fo + gets $fo line + puts $line + puts -nonewline stdout "> " + flush stdout +} +close $fo -- cgit v1.1