RyroNZ / UE4MasterServer

This is a plugin for Unreal Engine 4 that adds server registration, deregistration etc with a master server.

Home Page:http://ryanpost.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server Still thinks session is active

TimSSweeney opened this issue · comments

Whenever I start a session, close the game and look for sessions again, the server still returns an active session, if I try to join it, nothing happens. Closing the server and restarting it fixes this but how can I ensure the server knows the session is dead when I close the game. Is there a heartbeat somewhere that I can fix?

Hey Tim,

There is a heartbeat, the server is dropped after 60 seconds of no contact. This can be configured in PerformHeartbeat() in the plugin, and should match the servers heartbeat time + a small buffer for latency. I might update it so the server it tells the client how long to wait between heartbeats so it's only configured in one place.

Just pushed this up, you can now configure the heartbeat time in the server file (check self.time_between_heartbeats) and the client will be kept in sync with this.

Line 43 right?

Also how does the port forwarding thing work? do the clients need to enable port forwarding or the server?

Yeah line 43.
Clients have to port forward and open firewall to the game server so it's open to the internet, but the master server can check that a client is port forwarded and only show the game server in the list if it is. If a client's game is open to the internet the create session node will route through success, if it isn't the create session node will fail.
Hope that helps.

You need to also open the port to your server which is 8081 by default.

So if I were to distribute a game with this plugin, what would I need my clients to do ?

They would need to port forward there game server and that's it.

is there any way around that?

You'd need a NAT punchthrough server which isn't currently supported by this implementation. Port forwarding is pretty standard stuff when you're hosting servers.

I don't mean I want my client hosting the master server, I will be hosting it but I just wanted to know if the people that want to access the master server have to port forward?

They don't have to port forward to access the master server, they have to port forward their game server so people can actually join them from the internet. The master server won't put their server in the server list if it's not connectable from the Internet because nobody will be able to connect to it.

Then how does the steam OSS do this without needing port forwarding? Wouldn't the basic session principle be the same?

I'm not sure

It's because they have a nat punchthrough server which they've written into the steam OSS. I've written this myself. I may look at adding a method to do that but I'd need to research it further.

Do you have any update regarding nat punch-through? I was learning about this concept recently and this article is a great starting point. http://www.mindcontrol.org/~hplus/nat-punch.html