Connecting TServerSocket & TClientSocket over Internet ?

Posted on 2015-02-16
Last Modified: 2015-02-19
I can successfully connect TServerSocket & TClientSocket over LAN.
Similarly I check with and getting my current IP put it in the Client address and try to connect but it does not ?
Question by:Allan_Fernandes
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
LVL 19

Expert Comment

ID: 40611954
You need to give more details. What is, where is the server located, are there routers, firewalls, etc?
LVL 24

Expert Comment

ID: 40612093
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. 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.

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.
LVL 24

Expert Comment

ID: 40612094
PS: Communications over the Internet are not fast.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 40613544
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.
LVL 24

Expert Comment

ID: 40613590
Your customer wants to give the Server IP to other users (clients)?

Can you state clearly what you are after?
LVL 19

Accepted Solution

MerijnB earned 500 total points
ID: 40613685
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 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!

Author Comment

ID: 40618358
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.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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