Version 1 of Spread

Updated 2005-05-17 17:46:34 by CLN

Tcl interface to spread

...and "spread" is...? -- CLN

   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 disconnect

The 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.