Andry
Andry

Reputation: 16865

Programming a P2P distributed system using Microsoft WCF

I am about to develop a distributed system using WCF. I need to do the following:

I need to do this without discovery services or so on. I just need something that allows me to put an IP address and a port and to enstablish a communication.

Is it possible to use TCP? What about UDP?

Upvotes: 3

Views: 415

Answers (1)

Nate
Nate

Reputation: 30646

UDP is not a good choice for persistant connections; TCP is a much better choice. What you're talking about should be possible with WCF; the main issue is going to be getting the first IP address to connect to without having a centralized location.

Basically, you'll write a WCF service that has a specific endpoint, your service could be hosted by the "client" application so it that you can connect to others running the same program; you'd simply need their IP and port to connect to their end-point.

All that said, depending on the nature of your P2P system, writing your own TCP client and server may serve you better, since WCF is mostly about passing messages back and forth.

Upvotes: 1

Related Questions