使用INDY开发客户端服务器应用程序 [英] Developing Client server application using INDY

查看:89
本文介绍了使用INDY开发客户端服务器应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发客户端服务器应用程序,但是我想澄清一些有关以下内容的信息.

I am currently developing a client server app , but i want to clarify some information about the following.

我的idtcpserver绑定IP地址(127.0.0.1、192.168.1.1或我的公共IP)必须是什么

What must be my idtcpserver binding IP adress (127.0.0.1 ,192.168.1.1 or my public IP)

我使用IPconfig对其进行了检查,它回复了我192.168.1.1;但是我已经使用我的家用adsl路由器(单端口)连接到了互联网.

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).

我已经为我的客户应用程序分配了

I have assigned my client application with

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

idtcpclient.host := my public IP address

当我将两者都分配为127.0.0.1//都在本地计算机中时,应用程序运行良好

the application is working well when i assign both with 127.0.0.1 // as both are in the local machine

如何使我的应用程序通过Internet工作.当我尝试通过Internet连接时,客户端会回复我

How to make my application work over the internet.When i try to connect over the internet the client is replying me

套接字错误#10061连接被拒绝.

Socket error #10061 connection refused.

但是我的卡巴斯基网络监视器显示我的应用程序已打开端口(我将其设置为6000)

but my kaspersky network monitor is showing that my port is opened my myapplication (I set it to 6000)

原始项目 推荐答案

您不需要在服务器计算机上创建绑定.只需分配默认端口即可.在运行时,将使用该端口和一个空白IP地址创建一个绑定.

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地址从外部连接到网络时,实际上是在连接路由器(或其他硬件).您应该能够告诉路由器,在特定端口上收到的流量将定向到内部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). You should be able to tell your router that traffic received on a specific port will be directed to an internal IP address.

我的内部网络上运行着一些服务器,这就是我从Internet上使它们可用的方式.

I have a handful of servers running on my internal network, and this is how I make them available from the Internet.

您提到您有一台DLink路由器.如果它与我的相同:

You mention that you have a DLink router. 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. User name is "admin" with no password.
  • Click the Advanced tab and select Virtual Server.
  • The virtual server settings are pretty straight forward.

这篇关于使用INDY开发客户端服务器应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆