Re: [tkined] Probs with multicast

From: Juergen Schoenwaelder (
Date: Wed Jul 05 2000 - 14:29:42 MET DST

>>>>> Carsten Zerbst writes:

Carsten> I have some problem with multicast. If I open sockets on
Carsten> different groups and sockets and send with multicast to them,
Carsten> the results look more like a broadcast. Disregarding the
Carsten> group, all client socket with the same port get the
Carsten> packages. That is not the behaviour I expected. Did I
Carsten> something wrong or haven't I understand the multicast
Carsten> functionality ?

I do not understand where the problem is. Your server sends 4
multicasts to all the four different multicast transport addresses. So
you get four bindings evaluated - each binding for a different udp
socket handle. The only problem I can see is that the output of udp
info is not very useful in this case...

Here is a revised version of your example. (Note that the client does
not even have to use a multicast UDP socket if he just specifies a
multicast address as the destination.)


        set u [udp open]
        udp send $u 5678 "foobar"
        udp send $u 5679 "barfoo"


        proc getit {u} {
             puts "$u: got [udp receive $u] ([udp info $u])"

        lappend l [udp multicast open 5678]
        lappend l [udp multicast open 5678]
        lappend l [udp multicast open 5679]
        lappend l [udp multicast open 5679]

        foreach u $l {
            udp bind $u readable [list getit $u]

        vwait forever

The output I get in this case on the server side is:

    udp1: got 52111 foobar ( 5678 0)
    udp3: got 52111 barfoo ( 5679 0)

I think this is just working fine.


Juergen Schoenwaelder      Technical University Braunschweig
<>  Dept. Operating Systems & Computer Networks
Phone: +49 531 391 3289    Bueltenweg 74/75, 38106 Braunschweig, Germany
Fax:   +49 531 391 5936    <URL:>

-- !! This message is brought to you via the `tkined & scotty' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to <>. !! See for more information.

This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:27:48 MET