digitalmars.D.learn - passing data from one d app to another
- jake (2/2) Jan 09 2008 I was wondering how I would go about allowing one application to send da...
- BCS (5/8) Jan 09 2008 My first though was a pipe of some kind (network socket, unix domain
- jake (3/13) Jan 09 2008 Nevermind, I was trying sockets as I tried that and it works fine... Tha...
- Frank Benoit (11/14) Jan 09 2008 this is called inter process comunication aka IPC
I was wondering how I would go about allowing one application to send data to another. I would assume I would do this using a DLL. For example, I have a program that contains a function to read a text file and parse it, and I'd like an entirely different program to send what file to use to that program and have it run it. Also, it needs to be able to parse it multiple times, meaning if 5 other apps also send it something. Any pointers?
Jan 09 2008
jake wrote:I was wondering how I would go about allowing one application to send data to another. I would assume I would do this using a DLL. For example, I have a program that contains a function to read a text file and parse it, and I'd like an entirely different program to send what file to use to that program and have it run it. Also, it needs to be able to parse it multiple times, meaning if 5 other apps also send it something. Any pointers?My first though was a pipe of some kind (network socket, unix domain socket, etc) my next though was a pipeline (use the pipe system call followed by fork and exec) my next though was memory-mapping/shared-memory. My last though is I'm glad it's your problem and not mine. <g>
Jan 09 2008
BCS Wrote:jake wrote:Nevermind, I was trying sockets as I tried that and it works fine... Thanks! -Jake (aka okibi)I was wondering how I would go about allowing one application to send data to another. I would assume I would do this using a DLL. For example, I have a program that contains a function to read a text file and parse it, and I'd like an entirely different program to send what file to use to that program and have it run it. Also, it needs to be able to parse it multiple times, meaning if 5 other apps also send it something. Any pointers?My first though was a pipe of some kind (network socket, unix domain socket, etc) my next though was a pipeline (use the pipe system call followed by fork and exec) my next though was memory-mapping/shared-memory. My last though is I'm glad it's your problem and not mine. <g>
Jan 09 2008
jake schrieb:I was wondering how I would go about allowing one application to send data to another. I would assume I would do this using a DLL. For example, I have a program that contains a function to read a text file and parse it, and I'd like an entirely different program to send what file to use to that program and have it run it. Also, it needs to be able to parse it multiple times, meaning if 5 other apps also send it something. Any pointers?this is called inter process comunication aka IPC Here are the solutions that came to my mind: - passing files - unix file sockets - network sockets - shared memory - Windows COM - Corba (no d support afaik) - DBus (dsource dbus-d) - Tango clusters
Jan 09 2008