[Mono-list] Problme with UDP sockets

Giuseppe Greco giuseppe.greco@agamura.com
06 Jul 2003 15:31:05 +0200


Hi all,

I've written a UDP sender and receiver. I'm able to
send and receive unicast datagrams without problems.

The problems begin as I try to receive either
broadcast or multicast datagrams: I'm not able
to receive them at all (even if they are sent
successfully).

To receive broadcast datagrams, the receiver has just
to listen to a given port as for unicast datagrams
(no further steps are required).

To receive multicast datagrams, the receiver has to join
the multicast group after it has bound to the local port
by setting the following socket option:

socket.SetSocketOption(
  SocketOptionLevel.IP,
  SocketOptionName.AddMembership,
  new MulticastOption(multicastAddress));
 
Well, I'm not able to receive either broadcast or
multicast datagrams. I've tested the same program
with .NET on Windows, and it works fine.

Just a consideration: I'm testing the sender and the
receiver on the same machine. Could that be a problem?

Gius_.
 
-- 
----------------------------------------
Giuseppe Greco

::agamura::

phone:  +41 (0)91 604 67 65
mobile: +41 (0)76 390 60 32
email:  giuseppe.greco@agamura.com
web:    www.agamura.com
----------------------------------------