Thread overview | ||||||
---|---|---|---|---|---|---|
|
January 09, 2008 passing data from one d app to another | ||||
---|---|---|---|---|
| ||||
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? |
January 09, 2008 Re: passing data from one d app to another | ||||
---|---|---|---|---|
| ||||
Posted in reply to jake | 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>
|
January 09, 2008 Re: passing data from one d app to another | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | BCS Wrote:
> 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>
Nevermind, I was trying sockets as I tried that and it works fine... Thanks!
-Jake (aka okibi)
|
January 09, 2008 Re: passing data from one d app to another | ||||
---|---|---|---|---|
| ||||
Posted in reply to jake | 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
|
Copyright © 1999-2021 by the D Language Foundation