/[webpac]/openisis/current/tcl/oitstest
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /openisis/current/tcl/oitstest

Parent Directory Parent Directory | Revision Log Revision Log


Revision 237 - (hide annotations)
Mon Mar 8 17:43:12 2004 UTC (20 years, 1 month ago) by dpavlin
File size: 609 byte(s)
initial import of openisis 0.9.0 vendor drop

1 dpavlin 237 #!/usr/bin/tclsh
2     # ^^^ shebang line only for vim to recognize the language :)
3     #
4     # $Id: oitstest,v 1.1 2003/03/28 19:07:49 kripke Exp $
5     # oits tester
6     #
7    
8     proc oitsopen {} {
9     set sock [socket localhost 8080]
10     fconfigure $sock -translation binary
11     return $sock
12     }
13    
14     proc oitsreq {srv {req request} {res response}} {
15     puts $srv [$req serialize]
16     flush $srv
17     set i 0
18     while {0 < [gets $srv line]} {
19     $res deserialize $line
20     incr i
21     }
22     return $i
23     }
24    
25    
26     set server [oitsopen]
27     openIsisRec request
28     openIsisRec response
29    
30     request add 42 foo 142 bar
31    
32     puts [request serialize]
33     puts [oitsreq $server]
34     puts [response serialize]

  ViewVC Help
Powered by ViewVC 1.1.26