CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/hub/clients.ts
Views: 687
1
//########################################################################
2
// This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
// License: MS-RSL – see LICENSE.md for details
4
//########################################################################
5
6
const clients: { [id: string]: any } = {};
7
8
export function getClients() {
9
return clients;
10
}
11
12
export function pushToClient(mesg: { client_id: string }): void {
13
clients[mesg.client_id]?.push_to_client(mesg);
14
}
15
16