使用 INDY 开发客户端服务器应用程序
我目前正在开发一个客户端服务器应用程序,但我想澄清有关以下内容的一些信息。
我的 idtcpserver 绑定 IP 地址必须是什么(127.0.0.1 ,192.168.1.1 或我的公共 IP)
我使用 IPconfig 检查了它,它回复了我 192.168.1.1 ;但我已经使用我的家用 adsl 路由器(单端口)连接到互联网。
我已将我的客户应用程序分配给
idtcpclient.host := 我的公共 IP 地址
当我为两者分配 127.0.0.1 时,应用程序运行良好 // 因为两者都在本地计算机中
如何使我的应用程序通过互联网工作。当我尝试通过互联网连接时客户正在回复我
套接字错误 #10061 连接被拒绝。
但我的卡巴斯基网络监视器显示我的端口已打开我的应用程序(我将其设置为 6000)
原始项目 <一href="http://www.google.lk/url?sa=t&rct=j&q=indy%20demos%20sourceforge&source=web&cd=1&ved=0CBgQFjAA& url=http://sourceforge.net/projects/indy10clieservr/&ei=PbaiTsHeAsrTrQfdnrWnBA&usg=AFQjCNENXcLOhGq8vaXYger9DIbY7XAF1A" rel="nofollow">sourceforge
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)
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 := my public IP address
the application is working well when i assign both with 127.0.0.1 // as both are in the local machine
How to make my application work over the internet.When i try to connect over the internet the client is replying me
Socket error #10061 connection refused.
but my kaspersky network monitor is showing that my port is opened my myapplication (I set it to 6000)
original project
sourceforge
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不需要在服务器计算机上创建绑定。只需分配默认端口即可。在运行时,将使用该端口和空白 IP 地址创建单个绑定。
当您使用外部 IP 地址从外部连接到网络时,您实际上是在连接到路由器(或其他硬件)。您应该能够告诉您的路由器,特定端口上收到的流量将定向到内部 IP 地址。
我的内部网络上运行着一些服务器,这就是我如何从互联网上获取它们。
您提到您有一个 DLink 路由器。如果它的工作原理和我的一样:
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.
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.
I have a handful of servers running on my internal network, and this is how I make them available from the Internet.
You mention that you have a DLink router. If it works the same as mine: