我写了一个像qq一样的通讯软件。使用tcpclient和tcplistener。
现在有一个这样的问题:我机器的ip是222.199.248.74。每次我使用127.0.0.1程序就能够通讯(自己和自己),但我把ip改成222.199.248.74(其实也是想先测试自己和自己能否成功通讯)后就总会超时,使用断点检查发现是在tcpclient.connect()建立连接的时候出错,.net给我把的错误内容是:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond请问大虾这是为什么,我在同学的机器上也运行了我的软件,试着相互之间通讯,也是报这个超时的错误,我要怎样才能和别人的ip进行通讯呢?
现在有一个这样的问题:我机器的ip是222.199.248.74。每次我使用127.0.0.1程序就能够通讯(自己和自己),但我把ip改成222.199.248.74(其实也是想先测试自己和自己能否成功通讯)后就总会超时,使用断点检查发现是在tcpclient.connect()建立连接的时候出错,.net给我把的错误内容是:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond请问大虾这是为什么,我在同学的机器上也运行了我的软件,试着相互之间通讯,也是报这个超时的错误,我要怎样才能和别人的ip进行通讯呢?
谢谢大家继续讨论