package require spread set mbox [spread connect 4803@localhost] $mbox send channela "hello, world" $mbox send -type RELIABLE_MESS channelb "hello, sailor" proc receive_message {mbox} { set message [$mbox receive] foreach {message_type sender groups message_text} $message {break} puts "message received is $message_text" } $mbox onmsg receive_message $mbox join somechannel $mbox leave somechannel $mbox disconnectThe biggest thing missing right now is the inability to handle membership messages. There's some other stuff I want to add (handle configuration for tuning, multigroup multicast) but haven't gotten to yet.
vkvalli Where can I find Tcl bindings to it. I could not find it in the website or in the download bundle. Was it generated using swig. -?This looks really cool - I can really use this - are there any pointers to the code to make this happpen? Thanks - rMG There is a mention of Tcl bindings on the Spread website [1] - unfortunately, they refer to this Wiki page as the place to get them. It might be worth emailing the developers and asking if any of them has a copy of it, if you're interested in the code.JR - I wrote this code and created this wiki page but never found a place for the code to reside. Until I can find a better home, I've put the code up at http://home.diphi.com/users/jeffr/software/EKB You could put it on SourceForge [2] or a similar open-source hosting site.
See also:
- Concepts of Architectural Design for Tcl Applications
- How can Tcl programs on two different machines communicate
- Tcl implementations of publish-subscribe mechanisms