[Mono-list] FIXED - Everything working now

Ylian ysainthilaire at hotmail.com
Tue May 11 10:41:11 EDT 2010


Yesterday night I 
http://software.intel.com/en-us/blogs/2010/05/10/tools-for-upnp-running-on-linuxmono/
posted a blog  about the  http://opentools.homeip.net/dev-tools-for-upnp
Developer Tools for UPnP Technologies  now working on MONO.

First, ExclusiveAddressUse was optional and not my real problem anyway.
Skipping it was perfectly fine. The real problem was that I normally bind a
different socket to each local interface and join the SSDP multicast group.
After much trial and error I noticed that if I bind to ANY, it worked and I
started receiving multicast traffic, but bind to a specific interface and I
would not.

Now, I MUST know the specific local interface on which I received the
multicast packet so, binding to ANY is not an option. I then noticed that
you can specify an interface in the multicast join, so I tried creating a
bunch of sockets all with ANY bind, but each with a multicast join on a
separate local interface. That worked!

I had to chance the code because normally when I receive traffic, I look at
the client.localendpoint to give me to local interface then traffic came on.
Since all sockets are now bind to ANY, I have to carry the localendpoint
separately. This was an easy fix and the result is impressive. The main
tools Device Sniffer, Device Spy and Network Light all work perfectly.

Thanks,
Ylian
http://opentools.homeip.net opentools.homeip.net 
-- 
View this message in context: http://mono.1490590.n4.nabble.com/Porting-UPnP-Tools-to-MONO-Socket-ExclusiveAddressUse-problem-tp2173013p2173919.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list