+++ /dev/null
-#!/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
-}
+++ /dev/null
-#!/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
-}
-
+++ /dev/null
-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
-}
-
+++ /dev/null
-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
-}
-