views:

1475

answers:

5

Hi,

I'm trying to find a way to send a udp broadcast packets through a silverlight application. Most of the research i've done lists that this is not possible through silverlight due to the support for sockets being limited to tcp only. But is there some other way to send a broadcast packet for example through javascript or something that the silverlight application can call?

A: 

No there isn't. Most browsers limit you to HTTP or FTP so calling out to Javascript isn't going to help either.

AnthonyWJones
+1  A: 

You'll probably need to create your own custom browser plugin to do that for you.

As far as I know it isn't possible to use UDP with the major browser plugins, Flash, Silverlight etc. TCP is the lowest you get.

Browser based JS does not give programmatic access to UDP or even TCP. That is why you have AJAX, HTTP binding, Comet, XMPP Bosh etc. They try to emulate TCP's features with HTTP...


It appears Flash supports UDP as of Flash 10. I haven't tried it out but it sounds like it is not a low level API, only through RTMFP.

http://www.flashcomguru.com/index.cfm/2008/5/15/player-10-beta-speex-p2p-rtmfp http://justin.everett-church.com/index.php/2008/05/23/astrop2p/

bucabay
+1  A: 

The only plugins that support UDP client sending is Unity3D or Java. The problem mainly is when you use UDP you also need NAT punchthrough usually. So it is more complex (need a third party facilitator) since typically it is also peer to peer not just client-server.

You might be able to rig something with a proxy with Unity3D or Java but that would be a serious slowdown passing it into silverlight.

Silverlight and Flash only support TCP sockets currently.. Flash 10 does have some support for RTMFP which is UDP based but that is primarily for flash media server integration.

A response on the support of UDP in Silverlight: http://silverlight.net/forums/t/20249.aspx

Ryan Christensen
+1  A: 

Silverlight 4 will support UDP

Joseph Kingry
A: 

Flash Player 10.1 supports P2P with Adobe RTMFP and Stratus service. Stratus service is a Beta hosted rendezvous service that aids establishing communications between Flash Player endpoints. Unlike Flash Media Server, Stratus service mainly focuses on network address lookup and NAT traversal services for Flash Player endpoints, instead of supporting media relay, shared objects. This kind of service will also be integrated into next version of FMS.

Howard