IServer.Disconnected
event · IServer · cAlgo.API.Internals
DesktopCLICloud
Disconnected - Event raised when connection with the server is lost
Definition
event Action Disconnected;
api.Server.Disconnected += handler # handler()
Examples
protected override void OnStart()
{
Server.Disconnected += OnServerDisconnected;
}
private void OnServerDisconnected()
{
Print("Connection lost at {0}", Server.Time);
}
def on_start(self):
api.Server.Disconnected += self.on_server_disconnected
def on_server_disconnected(self):
api.Print(f"Connection lost at {api.Server.Time}")