feat: update socket connection

This commit is contained in:
karishmas6
2024-06-01 11:00:28 +05:30
parent 83740fa70c
commit 580e0c046a

View File

@@ -190,5 +190,18 @@ export class RemoteBrowser {
}
};
/**
* Updates the active socket instance.
* This will update all registered events for the socket and
* all the properties using the socket.
* @param socket socket.io socket instance used to communicate with the client side
* @returns void
*/
public updateSocket = (socket: Socket) : void => {
this.socket = socket;
this.registerEditorEvents();
this.generator?.updateSocket(socket);
this.interpreter?.updateSocket(socket);
};
}