Raknet:由于ID_NAT_TARGET_NOT_CONNECTED,Punchthrough尝试失败

时间:2018-01-20 01:10:17

标签: connection p2p raknet

我正在尝试从RakNet测试NATCompleteClient和NATCompleteServer示例。我能够将NATCompleteServer升级到更新循环阶段,但我无法让NATCompleteClient连接到服务器:

Do you have a server running the NATCompleteServer project? (y/n): y
Executing UPNPFramework

Failed UPNPFramework
Proceeding to next stage.
Executing NatTypeDetectionFramework

Failed NatTypeDetectionFramework
Proceeding to next stage.
Executing NatPunchthoughClientFramework

Enter IP of system NatPunchthroughServer, or press enter for default: 
SOMESERVERIP
Enter port of system NatPunchthroughServer, or press enter for default: 61111
Connecting...
Enter RakNetGuid of the remote system, which should have already connected
to the server.
Or press enter to just listen.
702561543119132154

Calculating port stride from SOMESERVERIP|61111
INCAPABLE_PORT_STRIDE. My external ID is MYEXTERNALIP|50000
Starting ID_NAT_PUNCHTHROUGH_REQUEST to guid 702561543119132154.
Punchthrough attempt to guid 702561543119132154 failed due to 
ID_NAT_TARGET_NOT_CONNECTED.
Failed: ID_NAT_TARGET_NOT_CONNECTED

Failed NatPunchthoughClientFramework
Proceeding to next stage.
Executing Router2Framework

Failed Router2Framework
Proceeding to next stage.
Executing UDPProxyClientFramework

Failed UDPProxyClientFramework
Connectivity not possible. Exiting

我在不在NAT后面的数字海洋小滴上运行NATCompleteServer。另外,我在canyouseeme.org上的Droplet上进行了测试,结果显示服务器上的端口61111没有被阻止。

如何解决此问题?

注意:此外,我知道自Facebook收购以来,RakNet已经死了。在我尝试将RakNet集成到我的项目中时,提问和寻求支持的最佳位置是什么?

1 个答案:

答案 0 :(得分:0)

我已经能够解决这个问题了。我已经意识到要使NATPunch示例与Raknet一起使用,您需要运行2个客户端和一个服务器。

有一个名为SLikeNet的新论坛正试图围绕RakNet重建社区。对于需要有关Raknet设置和使用方面的更多帮助的人,请使用论坛here。这些mod非常好用,有助于我解决这个问题