How can programs communicate?
Hey, I was wondering if anybody can recommend a good/fast way for two VB .NET programs to "communicate" - to send data back and forth and read it or do whatever with it...
I have two programs, both in vb.net, and I need to program both to make them "understand" each other... For example, one.exe "asks" the other what is 2 + 2, and two.exe "returns" 4...
Can anybody recommend a good (and fast) way to do this?
Thanks,
Jon
Re: How can programs communicate?
Re: How can programs communicate?
Re: How can programs communicate?
Also look into sockets. One typical way to do this is using sockets for communication. Generally, people use TCP with a listener (on the server end), and a client that calls in to the server. However, if you are only moving very small amounts of data, look into UDP. This is an unreliable protocol, which means that some packets can be dropped. If you are sending data chunks the size of your examples, you won't have to worry about this much. UDP with small packets acts something like a chat program.
By the way, this works fine for two computers on one system.
Re: How can programs communicate?
Alright, I'll check that out too, thx
Re: How can programs communicate?
If I wasn't currently in a class, I would have written a MUCH more coherent response. Sockets, especially using UDP, are particularly quick and easy ways to handle inter-program communication. Using UDP with large packets is harder, and there are other things to consider to handle dropped packets (return receipts, or loss-tolerant messages), but this may be the quickest and simplest technique.