简体   繁体   English

使用INDY开发客户端服务器应用程序

[英]Developing Client server application using INDY

I am currently developing a client server app , but i want to clarify some information about the following. 我目前正在开发客户端服务器应用程序,但是我想澄清一些有关以下内容的信息。

What must be my idtcpserver binding IP adress (127.0.0.1 ,192.168.1.1 or my public IP) 我的idtcpserver绑定IP地址(127.0.0.1,192.168.1.1或我的公共IP)必须是什么

I checked it using IPconfig it replied me 192.168.1.1 ;but i have connected to the internet using my home adsl router(single port). 我使用IPconfig对其进行了检查,它回复了我192.168.1.1;但是我已经使用我的家用adsl路由器(单端口)连接到了互联网。

I have assigned my client application with 我已将客户端应用程序分配给

idtcpclient.host := my public IP address idtcpclient.host:=我的公共IP地址

the application is working well when i assign both with 127.0.0.1 // as both are in the local machine 当我将两者都分配为127.0.0.1 //时,应用程序运行良好,因为两者都在本地计算机中

How to make my application work over the internet.When i try to connect over the internet the client is replying me 如何使我的应用程序通过Internet工作。当我尝试通过Internet连接时,客户端正在答复我

Socket error #10061 connection refused. 套接字错误#10061连接被拒绝。

but my kaspersky network monitor is showing that my port is opened my myapplication (I set it to 6000) 但是我的卡巴斯基网络监视器显示我的应用程序已打开端口(我将其设置为6000)

original project sourceforge 原始项目Sourceforge

You don't need to create a binding on the server machine. 您无需在服务器计算机上创建绑定。 Just assign the default port. 只需分配默认端口即可。 At run time, a single binding will be created with that port and a blank IP address. 在运行时,将使用该端口和一个空白IP地址创建一个绑定。

When you connect to your network from the outside using the external IP address, you are actually connecting to your router (or other hardware). 当您使用外部IP地址从外部连接到网络时,实际上是在连接路由器(或其他硬件)。 You should be able to tell your router that traffic received on a specific port will be directed to an internal IP address. 您应该能够告诉路由器,在特定端口上收到的流量将定向到内部IP地址。

I have a handful of servers running on my internal network, and this is how I make them available from the Internet. 我的内部网络上运行着一些服务器,这就是使它们可从Internet使用的方式。

You mention that you have a DLink router. 您提到您有一个DLink路由器。 If it works the same as mine: 如果它与我的相同:

  • Using your favourite web browser, open the router's settings page. 使用您喜欢的网络浏览器,打开路由器的设置页面。
  • I think the default address is http://192.168.0.1 . 我认为默认地址是http://192.168.0.1 User name is "admin" with no password. 用户名是“ admin”,没有密码。
  • Click the Advanced tab and select Virtual Server. 单击高级选项卡,然后选择虚拟服务器。
  • The virtual server settings are pretty straight forward. 虚拟服务器设置非常简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM