Thanks for the reply, Pete...
> > [...]
> > In his classes, he prefaces each broadcast message with a guid so that
> > when
> > a message comes in he can check to see if it's one he just sent. This
> > spurred a couple of questions for me:
> > 1) I haven't yet seen a message I drop on the broadcast address come
> > back on my receiver socket. Was this just speculative overkill on his part?
>
> Are you sure that's all he's using it for? He may be also (or instead)
> using the GUID to detect duplicated datagrams at the recipient end.
>
> My recollection is that the sending socket won't get echos, so if that's
> all he's doing, yes...that's probably overkill. But it's possible that's
> not all he's doing.
Well, that's what the comment next to the code says he was trying to do. In
any case, when I run the program and cause a message to be sent, I don't see
the message come by the receiving socket in the same process.
There's one socket opened that uses IPAddress.Broadcast to do the sending,
then there's another socket opened on my ip and bound to the same port for
receiving. As you mentioned, the receiving socket has
SocketOptionName.ReuseAddress set so that other processes can open it too.
I haven't tried running up multiple processes using the same object to see
if one of the other guys would get it but the sender currently isn't...
Thanks
Mark
|