send data beween applications

For general discussion related FlowStone
Jay
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

send data beween applications

Post by Jay »

Hi guys i was wondering if there is a good way of passing a string between 2 FlowStone applications or dll's

what i want to do is send a file address from one .exe to another and have it load the referenced file into a wave/mp3 player!

possible? Ruby?

thanks! - Jay
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: send data beween applications

Post by tester »

The simple way I would try is via some local text file (one exe saves data, second exe reads them).

But would be interesting to see two apps communicating directly (p2p) via internet.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: send data beween applications

Post by MyCo »

It can be done with network client <-> server communication. The problem with this solution is: the local IP Address of the computer has to be known. On most systems you could use localhost or 127.0.0.1 as IP, but somehow this doesn't work on my Win8 machine.
Attachments
program communication (MyCo).fsm
(32.73 KiB) Downloaded 1140 times
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: send data beween applications

Post by tester »

Works here, thanks.

Stupid question - both IP's (sender receiver) on your FS are the same? (I needed to change).
No blocking via firewall? (my XP asked if keep blocked or unlock).
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: send data beween applications

Post by MyCo »

tester wrote:Stupid question - both IP's (sender receiver) on your FS are the same? (I needed to change).


Yes, because these are external IP-Adresses of the PC. In my case, it's the IP address, that my router gave my PC by DHCP.

tester wrote:No blocking via firewall? (my XP asked if keep blocked or unlock).


It's a standard network communication. A Firewall may ask, because the Server is Server (waits for incomming connections)
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: send data beween applications

Post by RJHollins »

This is a great question, and an area that I'll be looking into down the line.

Thanks MyCo ... I'll check out your post. This could be a very handy programming technique for
an app I've been thinking about!

:)
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: send data beween applications

Post by tester »

Okay, it's nothing I worked in the past with, so forgive me the questions.

If there are separate computers, and transitory webpage - how to make two apps communicate with each other on p2p basis? From what I understand, running app would have to send it's ip to the webpage (how to arrange that?), and another running app would have to receive that ip via the same webpage (how to arrange that?), and then they could communicate like in example above (limitations? something to pay attention to?). I wonder if anyone tried to make it.

Another option that would be interesting for me, is to use skype for getting ip. I think.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
digitalwhitebyte
Posts: 106
Joined: Sat Jul 31, 2010 10:20 am

Re: send data beween applications

Post by digitalwhitebyte »

MyCo wrote:It can be done with network client <-> server communication. The problem with this solution is: the local IP Address of the computer has to be known. On most systems you could use localhost or 127.0.0.1 as IP, but somehow this doesn't work on my Win8 machine.

@MyCo
you can use the broadcast IP 255.255.255.255, on client side, it should work.
obvious use it in udp, it spreads the data across the network, on all the ip, so to speak,
but on the specified port, the server recognizes that will use them.
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: send data beween applications

Post by MyCo »

Yeah broadcast just works with UDP, the problem with UDP is, it's a "send and forget" protocoll. So no matter what you send out, you'll never know if someone even received something.
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: send data beween applications

Post by tester »

MyCo wrote:Yeah broadcast just works with UDP, the problem with UDP is, it's a "send and forget" protocoll. So no matter what you send out, you'll never know if someone even received something.


Can't this be made in both directions with schematic based roger-over confirmation?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Post Reply