mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Add connection timeout using server keepalives
Vanilla client will consider that connection has been lost when no server keepalive was received during the last 30 seconds. This commit implements a similar mechanism in MCC. See #802
This commit is contained in:
parent
1406c00abd
commit
877e50579d
4 changed files with 61 additions and 6 deletions
|
|
@ -43,15 +43,20 @@ namespace MinecraftClient.Protocol
|
|||
/// <param name="isJson">TRUE if the text is JSON-Encoded</param>
|
||||
void OnTextReceived(string text, bool isJson);
|
||||
|
||||
/// <summary>
|
||||
/// Called when receiving a connection keep-alive from the server
|
||||
/// </summary>
|
||||
void OnServerKeepAlive();
|
||||
|
||||
/// <summary>
|
||||
/// Called when an inventory is opened
|
||||
/// </summary>
|
||||
void onInventoryOpen(Inventory inventory);
|
||||
void OnInventoryOpen(Inventory inventory);
|
||||
|
||||
/// <summary>
|
||||
/// Called when an inventory is closed
|
||||
/// </summary>
|
||||
void onInventoryClose(byte inventoryID);
|
||||
void OnInventoryClose(byte inventoryID);
|
||||
|
||||
/// <summary>
|
||||
/// Called when the player respawns, which happens on login, respawn and world change.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue