Julien Ferraro
Julien Ferraro

Reputation: 83

Send messages to applications on the network (.Net)

I'm creating an application that will be installed on a few computers on a local network. As soon as the application is launched, it must talk to all other instance on the network to tell them that it's just been launched. This way, any instances on the network know about all other instances.

This could be used, for instance, to manage floating licences of my application.

Any idea on how to do this in .Net (C# preferred)

Many thanks Julien

Upvotes: 4

Views: 661

Answers (5)

Lex Li
Lex Li

Reputation: 63183

If you are looking for popular/standardized solutions, I think Bonjour is a good one,

http://en.wikipedia.org/wiki/Bonjour_%28software%29

http://www.mono-project.com/Mono.Zeroconf

Upvotes: 0

John Saunders
John Saunders

Reputation: 161773

You can do this with WCF, which does support Peer to Peer communications.

Upvotes: 3

Mark Wilkins
Mark Wilkins

Reputation: 41222

Multicast can be used for this type of operation.

Upvotes: 0

kyoryu
kyoryu

Reputation: 13055

You'll probably have to broadcast a UDP message. This will generally only work on the local subnet.

If the real goal is to have all of the instances be able to talk to each other, in some cases it can be easier to have a single (known) point of contact for all instances rather than a full peer-to-peer mesh. Less connections to manage often means less headaches.

Upvotes: 0

Brian R. Bondy
Brian R. Bondy

Reputation: 347236

Assuming you have a way to know the addresses of the installed clients.

You could easily implement the communication between hosts using WCF and C#.

Upvotes: 0

Related Questions