Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How do programs talk with each other?

How do programs talk with each other?

Scheduled Pinned Locked Moved C / C++ / MFC
c++pythonsysadminhelpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nathan Addy
    wrote on last edited by
    #1

    1: If a want to make a programs that can send and recieve requests with one another, would sockets be the usual way to construct that interface? 2: can only one program or many connect with one server on one port? ie, do I have to have an open port each time my program wants to make a simultaneous connection? 3: Is there an easy way to connect between two languages? ie some easy way to program a universal way of sending back and forth. In sockets, python has pickling and mfc has csocketfile for working with data. Is there something like this that works with both C++ and python, or should just search the libraries for this? Thanks for the help!

    A T V 3 Replies Last reply
    0
    • N Nathan Addy

      1: If a want to make a programs that can send and recieve requests with one another, would sockets be the usual way to construct that interface? 2: can only one program or many connect with one server on one port? ie, do I have to have an open port each time my program wants to make a simultaneous connection? 3: Is there an easy way to connect between two languages? ie some easy way to program a universal way of sending back and forth. In sockets, python has pickling and mfc has csocketfile for working with data. Is there something like this that works with both C++ and python, or should just search the libraries for this? Thanks for the help!

      A Offline
      A Offline
      Archer282
      wrote on last edited by
      #2

      Using sockets should be perfectly compatible accross languages you might also want to check out Pipes

      1 Reply Last reply
      0
      • N Nathan Addy

        1: If a want to make a programs that can send and recieve requests with one another, would sockets be the usual way to construct that interface? 2: can only one program or many connect with one server on one port? ie, do I have to have an open port each time my program wants to make a simultaneous connection? 3: Is there an easy way to connect between two languages? ie some easy way to program a universal way of sending back and forth. In sockets, python has pickling and mfc has csocketfile for working with data. Is there something like this that works with both C++ and python, or should just search the libraries for this? Thanks for the help!

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        yeah, you can depend upon socket for universal data transfer it will work with every Socket aware langauge without any problem.

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta

        1 Reply Last reply
        0
        • N Nathan Addy

          1: If a want to make a programs that can send and recieve requests with one another, would sockets be the usual way to construct that interface? 2: can only one program or many connect with one server on one port? ie, do I have to have an open port each time my program wants to make a simultaneous connection? 3: Is there an easy way to connect between two languages? ie some easy way to program a universal way of sending back and forth. In sockets, python has pickling and mfc has csocketfile for working with data. Is there something like this that works with both C++ and python, or should just search the libraries for this? Thanks for the help!

          V Offline
          V Offline
          V 0
          wrote on last edited by
          #4

          an older method is the handshake method. That's how the old modems work if I'm not mistaken. Suppose Program A and B A writes a file to disk for B to read and waits until B replies with a file. In the meantime B picks up the file, reads the data and replies to A etc etc. The method is quite old and there are probably better ways, but it still works. good luck. No hurries, no worries.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups