From f12e7bc967736e8e76c8a70cd7e2ad772f891dc4 Mon Sep 17 00:00:00 2001 From: xiaotaow Date: Mon, 3 Mar 2003 05:57:17 +0000 Subject: [PATCH] Changed by Pat to fit into TEA format -xiaotao --- test/test.tcl | 27 --------------------------- test/test2.tcl | 25 ------------------------- test/testmcast.tcl | 29 ----------------------------- test/testmcast2.tcl | 23 ----------------------- 4 files changed, 104 deletions(-) delete mode 100755 test/test.tcl delete mode 100755 test/test2.tcl delete mode 100644 test/testmcast.tcl delete mode 100644 test/testmcast2.tcl diff --git a/test/test.tcl b/test/test.tcl deleted file mode 100755 index 4fdedd6..0000000 --- a/test/test.tcl +++ /dev/null @@ -1,27 +0,0 @@ -#!/home/xiaotaow/tcl83/bin/tclsh - -global gotcha; - -proc handleSock {sock} { - global gotcha; - - set content [gets $sock] - puts "Received $content" - puts "Peer [udp_conf $sock -peer]" - set gotcha 1 -} - -load "../unix/libudp.so" - -set sock [udp_open 5061] -puts "Myport: [udp_conf $sock -myport]" - -if {$sock > 0} { - fileevent $sock readable "handleSock $sock" - udp_conf $sock 204.198.76.59 5061 -# udp_conf $sock minsk.clic.cs.columbia.edu 5060 - puts -nonewline $sock "test" - flush $sock - vwait gotcha - close $sock -} diff --git a/test/test2.tcl b/test/test2.tcl deleted file mode 100755 index aa49087..0000000 --- a/test/test2.tcl +++ /dev/null @@ -1,25 +0,0 @@ -#!/home/xiaotaow/tcl83/bin/tclsh - -global gotcha; - -proc handleSock {sock} { - global gotcha; - - set content [udp_read $sock] - puts $content - set gotcha 1 -} - -load "../unix/libudp.so" - -set sock [udp_open 38880] - -if {$sock > 0} { -# udp_conf $sock 204.198.76.55 5061 - udp_conf $sock minsk.clic.cs.columbia.edu 5061 - puts "We will send testtest" - puts $sock "testtest" - flush $sock - close $sock -} - diff --git a/test/testmcast.tcl b/test/testmcast.tcl deleted file mode 100644 index a466028..0000000 --- a/test/testmcast.tcl +++ /dev/null @@ -1,29 +0,0 @@ -global gotcha; - -proc handleSock {sock} { - global gotcha; - set content [read $sock] - puts "Received $content" -# set gotcha 1 - puts [udp_conf $sock -peer] -} - -load "../unix/libudp.so" - -# Since the socket is bound to the local -# port when it is created then we must set -# this value to the port number that is used -# by the multicast group. For instance foe SAP -# announcements this should be 9875 -set sock [udp_open 9875] - -# joins the multicast group -udp_conf $sock -mcastadd 224.2.127.254 -if {$sock > 0} { - fileevent $sock readable "handleSock $sock" - vwait gotcha - # leaves the multicast group - udp_conf $sock -mcastdrop 224.2.127.254 - close $sock -} - diff --git a/test/testmcast2.tcl b/test/testmcast2.tcl deleted file mode 100644 index 6c7b7f7..0000000 --- a/test/testmcast2.tcl +++ /dev/null @@ -1,23 +0,0 @@ -global gotcha; - -load "../unix/libudp.so" - -# Since the socket is bound to the local -# port when it is created then we must set -# this value to the port number that is used -# by the multicast group. For instance foe SAP -# announcements this should be 9875 -set sock [udp_open 9875] - -# joins the multicast group -udp_conf $sock 224.2.127.254 9875 -udp_conf $sock -mcastadd 224.2.127.254 -if {$sock > 0} { - puts "Will send testtest" - puts $sock "testtest" - flush $sock - # leaves the multicast group - udp_conf $sock -mcastdrop 224.2.127.254 - close $sock -} - -- 2.23.0