Solved

Connecting TServerSocket & TClientSocket over Internet ?

Posted on 2015-02-16
7
237 Views
Last Modified: 2015-02-19
I can successfully connect TServerSocket & TClientSocket over LAN.
Similarly I check with MyIp.info and getting my current IP put it in the Client address and try to connect but it does not ?
0
Comment
Question by:Allan_Fernandes
  • 3
  • 2
  • 2
7 Comments
 
LVL 19

Expert Comment

by:MerijnB
Comment Utility
You need to give more details. What is myip.info, where is the server located, are there routers, firewalls, etc?
0
 
LVL 24

Expert Comment

by:jimyX
Comment Utility
So many questions have been asked about this issue. But it is not Delphi or code related issue, it is a Network Configuration.

I see what you tried. Although you have got the external IP of your computer, you can not use it for the Server Socket to be connected to it from another computer directly over the internet. For a very basic reason, networks are not designed to work like that, security-wise. MyIP.info does not provide you enough information, check this one to get what I mean. What do you see under network is the ISP server network that blocks your IP from being connected to, from outside.

So, since you could not connect then, you have what is known as a non-routable IP address, which is the one that everyone gets when connecting to the internet via ISP. To be communicating through the ISP.

You need to approach your ISP and request a public IP address, if they allow it they will rent you one.

Solutions:
It depends on what you are trying to do here.
If you need something like TeamViewer then you need to have Server (public IP).
Alternative, for simple transmissions, you can use online Database or if you have a website hosted at any Server you can use TidHttp and with some php help you can communicate very easily through the Database.
0
 
LVL 24

Expert Comment

by:jimyX
Comment Utility
PS: Communications over the Internet are not fast.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Allan_Fernandes
Comment Utility
I have a backup software and it works well over LAN / MPLS. I have been approached by a customer who says in his country it is not easy to get a Static IP  therefore other applications like Antivirus etc use methods wherein a new IP is allocated each time the Server connects to the Web and all the clients are supposed to use that.
0
 
LVL 24

Expert Comment

by:jimyX
Comment Utility
Your customer wants to give the Server IP to other users (clients)?

Can you state clearly what you are after?
0
 
LVL 19

Accepted Solution

by:
MerijnB earned 500 total points
Comment Utility
it is not easy to get a Static IP  therefore other applications like Antivirus etc use methods wherein a new IP is allocated each time the Server connects to the Web and all the clients are supposed to use that

If I understand correctly this means that you need to get  a server with a static IP somewhere, where both your client software and your server software connect to. This means you need to change the architecture of both your client and your server software.

Alternatively you can look into services like http://www.dynip.com/ this is probably the way of least resistance.

Once you have a static IP, or a dynamic DNS (like dynip) you need to configure the network configuration of your client.
I don't know where you are located, but I doubt you don't have your own public ip, I can image that your public ip isn't static. This is something you need to check though!
0
 

Author Comment

by:Allan_Fernandes
Comment Utility
Thanks dynamic DNS services is exactly what I was looking for but did not know the terminology that my customer was talking about.

Clarification to jimyX,
What I meant is that my application's Client Modules (running on several machines within the LAN) connect to the Server Module (on a Predefined machine with static IP) , during Setup the Servers IP/Name is configured on each Machine. Thus building a simple Socket Connection.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now