Skip to content

IServer.Connected

event · IServer · cAlgo.API.Internals

DesktopCLICloud

Event raised when successfully connected with the server

Definition

event Action Connected;
api.Server.Connected += handler  # handler()

Examples

protected override void OnStart()
{
    Server.Connected += OnServerConnected;
}

private void OnServerConnected()
{
    Print("Connection restored at {0}", Server.Time);
}
def on_start(self):
    api.Server.Connected += self.on_server_connected

def on_server_connected(self):
    api.Print(f"Connection restored at {api.Server.Time}")