Download

Check if server is running at remote address

Hey guys,

I’d soon like to implement multiplayer in my game but at the moment I’m a bit stuck. The way I want to do it is like it is done in e.g. Minecraft: Everybody who likes can download the dedicated server .exe and run a server, therefore I can’t use the Online Subsystem as far as i understand. So my “server browser” would rely on people knowing the address of a server and adding it to their personal server list, so that I could travel the clients to that address. My problem now is that I can’t find a way to check if there is a server running on that IP-Address/Port and maybe get some information like the number of connected clients except with adding a custom TCP communication myself as Rama did it here https://wiki.unrealengine.com/TCP_Socket_Listener,Receive_Binary_Data_From_an_IP/Port_Into_UE4,%28Full_Code_Sample%29. Just that I wouldn’t connect from UE4 to Python but from UE4 to UE4 and as UE has that many built in functionalities there might already be a function for things like this that I just haven’t found yet.
Maybe someone out there can help clarify things here a bit.

Thanks in advance,
Taces

i am currently trying the same thing. spamming connect is not really what i want to do, to check if the server is online…

That’s why Clients have a “refresh list” button or timer.
I mean, it’s common in online games.

well i am not developing a game right now, i have a tcp server on a smartphone to which i want to connect from ue as a client as soon as the server goes online (without user input).
i am currently “spamming” connect every three seconds but everytime i do and the server is not online yet, the game freezes for like 5 seconds
any help would be greatly appreciated :slight_smile: