Results 1 to 6 of 6

Thread: How can programs communicate?

  1. #1

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Question 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

  2. #2
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Re: How can programs communicate?

    look into 'remoting'.

  3. #3

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: How can programs communicate?

    appreciate it

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    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.
    My usual boring signature: Nothing

  5. #5

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: How can programs communicate?

    Alright, I'll check that out too, thx

  6. #6
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    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.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width