Hi, first of all, excuse me for my bad English
i am working on a multiplayer game while server is deployed as dedicated server.
i implemented sessions on dedicated server with EOS OSS and all things work fine.
I realized after a long research that dedicated server is designed to host one session per instance server running on the host machine (because if many sessions are hosted by one instance, they share one server game mode and in case of āserver travelingā when a session starts, all other sessions will follow the server and spawn players into the traveled map ).( please correct me if there is a way to do server traveling for a specific session only without impacting the other sessions).
for this reason, i changed my strategy to multi instances servers while each instance server hosts one session only (i donāt know if it is the best practice or not).
In this case. i will implement a third party code which manage theses instances and give the client a server instance host and port based on the map mode chosen by the player when he clicks on āstart matchā. what i need to do in this third party code manager is to check automatically that the server instance is running and it can handle join session before assigning it to the client. My question is: does unreal engine provide an API to call in order to get the server liveness/ readiness status ?
for those who are interested, i fixed my problem. i provide 2 solutions:
Solution1 (Not recommended): consists to notify the manager that the session created successfully (from onSessionCreateCompleted (server side) ā http post to the manager to inform it that the session is running, so it can now handle the condition before assign server to clients)
Solution2 (Recommended): let the manager find by itself all Open UDP ports (because dedicated server run on UDP) while processes running on these ports are ādedicated serverā processes. for example: in case of dedicated server running on windows host. a simple powershell command can find and fitler UDP ports in order to return them to client:
# 'UnrealEditor' is the executable filename of the dedicated server in this example
Get-NetUDPEndpoint | Where {$_.LocalAddress -eq "0.0.0.0"} |select LocalPort,@{Name="Process";Expression={(Get-Process -Id $_.OwningProcess).ProcessName}} | Where {$_.Process -eq "UnrealEditor"}| ConvertTo-Json
Example output for 3 server instances running:
[
{
"LocalPort": 7779,
"Process": "UnrealEditor"
},
{
"LocalPort": 7778,
"Process": "UnrealEditor"
},
{
"LocalPort": 7777,
"Process": "UnrealEditor"
}
]
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.