Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using UDP protocol with WCF

Tags:

wcf

udp

Which binding should I use to make my WCF application communicate through UDP instead of TCP?

Can someone point me to the right direction so that I could use UDP with WCF?

Thanks

like image 270
Josh Avatar asked Dec 13 '09 16:12

Josh


2 Answers

This is rather long winded, but looks comprehensive enough to help you get started. The majority of the article covers how to write your own UDP transport, and at the bottom it ties it in to WCF services.


Edit, Jan 2016 (5 years later): Link updated to a mirror of the same archive (confirmed via Archive.org's Wayback Machine mirror copy of the URL). A quick search shows there's a lot more potential native support and options available in newer .NET WCF for doing UDP. I no longer work in .NET technologies so others may find the original answer to be antiquated or obsolete, and wish to research newer methods.

like image 138
Mike Atlas Avatar answered Oct 15 '22 22:10

Mike Atlas


I believe you will have to write a custom transport to accomplish this. There is no builtin UDP support that I know of, except maybe for multicasting. Probably because TCP gives you certain guarantees about how a message is delivered that UDP lacks.

like image 1
AaronLS Avatar answered Oct 16 '22 00:10

AaronLS