- Added initial implementation of `onConnectionDisconnect(Connection connection)`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-11-26 14:12:04 +02:00
parent bbcf9b1413
commit d44cc03437
1 changed files with 25 additions and 0 deletions

View File

@ -265,6 +265,31 @@ public class Server : MessageDeliveryTransport
return true;
}
// On connection disconnecting
public void onConnectionDisconnect(Connection connection)
{
// TODO: Decide whether it is a user link or a server de-link
import renaissance.connection.connection : LinkType;
LinkType type = connection.getLinkType();
logger.dbg("Disconnecting link ", connection, " of type ", type);
switch(type)
{
case LinkType.UNSET:
logger.warn("Not doing anything because this link's type was never set");
break;
case LinkType.USER:
// TODO: Implement me
break;
case LinkType.SERVER:
// TODO: Implement me
break;
default:
break;
}
}
}
version(unittest)