Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I transload data between two delphi applications over internet?

Tags:

delphi

indy

Hi let me make my question clear. Two people using my app are connected to the internet. Both have each other's IP and they want to chat (like Y!messanger) with each other. I think I need to use Indy components; right? Which component should I use? Thanks in advance

like image 455
Javid Avatar asked Nov 30 '10 19:11

Javid


3 Answers

Have you looked at any of the demos on Indy's website yet?

like image 64
Remy Lebeau Avatar answered Oct 21 '22 07:10

Remy Lebeau


In general, you are looking to create a "Client/Server" type application. A quick Google search for "indy client server example" pulls up lots of results, including this one: http://www.devarticles.com/c/a/Delphi-Kylix/A-Real-World-Client-Server-Application-in-Delphi/

In reality, this gets a lot more complicated when you have firewalls and NATs with private IP addresses. You will have to consider how your application will either get around or through these types of technologies.

like image 43
Scott W Avatar answered Oct 21 '22 06:10

Scott W


Similar to what Scott said, I think that your biggest problem is getting them talking to each other. My computers at home go through a router, which blocks all incoming connection requests (i.e. requests to start a conversation between two computers) from the Internet. My computers can send connection requests OUT, and start a conversation that way, but unless you modify the router (port forwarding) my computers can not receive connection requests.

You need a server somewhere to which both people will connect, that can then relay messages back and forth. To get really tricky, once the connection is made to the server the two computers can then be put into direct contact, but that involves UDP packets and some clever magic.

like image 3
Graham Avatar answered Oct 21 '22 07:10

Graham