Click here to Skip to main content
15,905,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

What's the easiest way to implement lan interprocess communication ?
I need process on machine A be blocked until process on machine B send him just a simple string msg

Don't now if it worth building a whole WCF project

What Do you say?
Posted

Well, you could of course listen on a udp port, and handle the message directly.
The things is when you start doing this, you'll have to handle all the nitty-gritty of opening ports, checking the firewall, checking security, checking if the client can do this operation, etc...
WCF handles all this for you. If you do it yourself, you run the chance of creating vulnerabilities and introduce unhandled conditions in your program.
 
Share this answer
 
Here's a good example using C#. It does a lot more than what you ask for, but I'm sure you can zoom in on the relevant bits...
http://msdn.microsoft.com/en-us/magazine/cc163648.aspx[^]

Choosing the port is up to you. Don't use anything below 1023, because they're pre-assigned to services. You should make your port configurable, because someone else may have chosen the same port, and you'll run into a conflict.

Best practice is to get something above 6000.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900