Integrating NATPunchSamples into external projects

Supporttopics regarding SLikeNet
Post Reply
mantracker
Junior-Member
Posts: 10
Joined: Sat Jan 20, 2018 1:23 am

Integrating NATPunchSamples into external projects

Post by mantracker »

Hi, so I finally got NATCompleteClient and NATCompleteServer working and running. Now comes the hard part of figuring out how to integrate them into my Unreal project.

Prior to trying to integrate the samples into Unreal, I am just trying to do some basic testing. Specifically, I am able to create a reproducible case where my UE4 game client and UE4 game server are unable to connect when the machines they are running on are behind NAT. I am hoping that by running the NATCompleteClients on those 2 machines (and have them connect to NATCompleteServer), they will be able to connect.

This obviously is not working. So I have a few questions:

1. When NATCompleteClients punch through to each other, are those holes kept open? If so, then it follows that other applications should be able use those holes that are opened by SLikeNet without integrating SLikeNet in the UE4 Project right?

2. My game client/server always connect using port 7777. Therefore, I tried using port 7777 when NATCompleteClient asked for local port entry. How would I verify that port 7777 on my game client and game server are open once the NATCompleteClient connects? What kind of tools are available to see whether the game client and game server are viewable to each other on port 7777?

3. Are there any recommendations for integrating SLikeNet into Unreal?

Thanks

Luke1410
Site Admin
Posts: 54
Joined: Wed Jul 12, 2017 12:42 am

Re: Integrating NATPunchSamples into external projects

Post by Luke1410 »

@1 To clarify: If you are using SLikeNet/RakNet's NAT punchthrough technique, you also need to direct the traffic through SLikeNet/RakNet. Other applications won't be able to connect by themselves just because you successfully established a connection using NAT punchthrough with SLikeNet/RakNet.

@2 I think the answer for the previous question answers this one as well, right?

@3 We currently have no tutorial to integrate SLikeNet into the UE4. However, googling for Unreal Engine RakNet brings up some (at first spot) useful tutorials in the ue-forums which seem to provide step-by-step instructions to integrate RakNet into UE4. These steps should also work with SLikeNet. Did you try these out?

mantracker
Junior-Member
Posts: 10
Joined: Sat Jan 20, 2018 1:23 am

Re: Integrating NATPunchSamples into external projects

Post by mantracker »

Hi Luke, I was able to integrate Raknet into our project after wrangling with it quite a bit. It seems that I will have to write pretty low level netcode in Unreal to integrate SLikeNet because as you said, other applications can't connect using the hole punched by RakNet.

That being said, i am working more on UE4 side right now trying to understand how to change UE4's netcode to integrate RakNet. Once I have that figured out, I will begin integrating Raknet and then I will have more questions in the future about RakNet.

Thanks

Luke1410
Site Admin
Posts: 54
Joined: Wed Jul 12, 2017 12:42 am

Re: Integrating NATPunchSamples into external projects

Post by Luke1410 »

There's also a channel on Discord another RakNet user set up a couple of days ago. Maybe you can also find some help over there with getting RakNet integrated in UE4: https://discord.gg/BByjwux

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest