views:

62

answers:

3

I understand that trusted silverlight applications can communicate with each other over the LAN connection (peer to peer). Can they do this without an internet connection once installed out of browser? Do they need to first download some sort of Access Policy?

If not, is there some alternative way of doing this, perhaps with some kind of helper service on the computer?

Can they use similar techniques to talk to Local non-Silverlight devices, e.g. could a trusted silverlight application talk to an iPhone app over a local area network?

A: 

I'm not sure where you got your information from but as far as I'm aware there is no builtin way for Silverlight applications to connect to each other peer-to-peer. However it is possible to place a simple server application on the LAN through which Silverlight applications running on different nodes can communicate.

The plumbing needed to create peer-to-peer pipes is missing from Silverlight. It only has a means to connect to a specific TCP/IP port or to listen to Multicast UDP sources, it can't create a Listening port that waits for a connection nor generate UDP output.

AnthonyWJones
Looking at Silverlight 4 it can generate MultiCast UDP output. Although I'm not sure if this is ideal because I'm not sure it's great to rely on the network infrastructure suporting UDP.
Tuskan360
A: 

You could go this by calling COM objects from Silverlight, however

Just because you can hammer in a nail with a screw driver, does not make the screw driver the best tool for the job.

Have a look at using WPF so you get the full .net framework.

Ian Ringrose
True although networking is a tiny part of a much larger application. I would like to be able to make all the other features available either without installation, or cross-platform (mac/linux). I'm also looking at a system that could be "installed" on many computers for a day, then removed the following day. Silverlight offers a very quick easy way of installing and un-installing for the computers in the network.
Tuskan360
+1  A: 
System.Net.Sockets.UdpAnySourceMulticastClient

Does allow you to connect between Multiple Silverlight applications on the same LAN. It does not require any internet connection after the application is installed out of browser.

I'm not clear if this could be used for communication with non-Silverlight applications althouh I believe it probably could since UDP Multicast is a standard protocol.

In situations where the network infrastructure is older it may not support UDP Multicast addresses. In this case, the best solution would be to install a separate local server on one of the client machines, to which all other silverlight applications could connect (once the user had typed in the IP address).

Tuskan360
It is unlikely that UdpMulticast will get pass many routers, however if all the machines are on the same segment of a LAN you may be ok.
Ian Ringrose
Testing on my home network worked through two identicfal Linksys routers and one Unmanaged Network swithch, although I agree that it's not likely to be reliable in environments I have less control over. I'm now planning to use WPF instead of silverlight for the bulk of the project, although some clients will be able to connect using a cut down silverlight app.
Tuskan360