You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. I had this bug 6 mounth ago:
"issue with kcp. i have two servers with two different maps on each one. first server have small map, second server have big map. both servers placed on linux. so client connect fine to server with small map, but when i try to connect to server with big map i have this error on server:
KCP: Connection timed out after not receiving any message for 10000ms. Disconnecting.
i guess while client load big map, there are no packages going to server or something, it reach 10000ms and server disconned the client. which does not make any sense because client doesnt even load the map
there is no such problem on tcp"
I got temp solutioon by: "increase TIMEOUT for TickIncoming_Authenticated -> HandleTimeout method in KcpConnection.cs"
But it cause as i think this problem: "hello, someone know what to do in that case? Android. When any player connect to server, play some time, then manual disable internet connection, client auto disconnecting. But he still present on server. As a result, that client reenable internet connection, connect to server, and there are 2 same players. How can i prevent it?"
I got this bug only with KCP.
2. I have Gaia usage in my game which load and unload terrain scenes and its a big problem for me
3. I found a solution, it should be changed and optimized but i think this description will be enough to understand how to solve that, main idea is to channge timeout for specific client which start load map after connect to server:
I added another const to KcpConnection with load map timeout, for me 50000 is enough. But timeout var will be overrided by KcpTransport Component, so new const should be exposed here too.
I made vars: server and client at KcpTransport as public to have access to connections of server and connection of client.
Then i added this code to my custom network manager, but i think it should present at NetworkManager https://pastebin.com/KpdThNkb
Now i have 50000ms timeout when player handshake with server and when client starts load new scene, because server and client have their own timeout checkers and default 10000ms after. But on server it should run not with OnServerConnect but on similar method as client has OnClientChangeScene. Because it can be situation when player dies and will be respawned far away from dead position which means it will be full load as if he have first connect and it should be 50000ms again.
Also i already changed this code for my game case (added stop coroutines when, etc.), but as i said i made it only for demostration and it should be changed for general usage
The text was updated successfully, but these errors were encountered:
1. I had this bug 6 mounth ago:
"issue with kcp. i have two servers with two different maps on each one. first server have small map, second server have big map. both servers placed on linux. so client connect fine to server with small map, but when i try to connect to server with big map i have this error on server:
KCP: Connection timed out after not receiving any message for 10000ms. Disconnecting.
i guess while client load big map, there are no packages going to server or something, it reach 10000ms and server disconned the client. which does not make any sense because client doesnt even load the map
there is no such problem on tcp"
I got temp solutioon by: "increase TIMEOUT for TickIncoming_Authenticated -> HandleTimeout method in KcpConnection.cs"
But it cause as i think this problem: "hello, someone know what to do in that case? Android. When any player connect to server, play some time, then manual disable internet connection, client auto disconnecting. But he still present on server. As a result, that client reenable internet connection, connect to server, and there are 2 same players. How can i prevent it?"
I got this bug only with KCP.
2. I have Gaia usage in my game which load and unload terrain scenes and its a big problem for me
3. I found a solution, it should be changed and optimized but i think this description will be enough to understand how to solve that, main idea is to channge timeout for specific client which start load map after connect to server:
https://pastebin.com/KpdThNkb
Now i have 50000ms timeout when player handshake with server and when client starts load new scene, because server and client have their own timeout checkers and default 10000ms after. But on server it should run not with OnServerConnect but on similar method as client has OnClientChangeScene. Because it can be situation when player dies and will be respawned far away from dead position which means it will be full load as if he have first connect and it should be 50000ms again.
Also i already changed this code for my game case (added stop coroutines when, etc.), but as i said i made it only for demostration and it should be changed for general usage
The text was updated successfully, but these errors were encountered: