BREAKING CHANGE(smartsocket): Replace setExternalServer with hooks-based SmartServe integration and refactor SocketServer to support standalone and hooks modes

This commit is contained in:
2025-12-03 09:22:44 +00:00
parent 1d62c9c695
commit 09dbb00179
7 changed files with 161 additions and 175 deletions

View File

@@ -40,14 +40,11 @@ export class Smartsocket {
}
/**
* Set an external server (smartserve) for WebSocket handling
* Returns WebSocket hooks for integration with smartserve
* Pass these hooks to SmartServe's websocket config
*/
public async setExternalServer(
serverType: 'smartserve',
serverArg: any,
websocketHooks?: pluginsTyped.ISmartserveWebSocketHooks
) {
await this.socketServer.setExternalServer(serverType, serverArg, websocketHooks);
public getSmartserveWebSocketHooks(): pluginsTyped.ISmartserveWebSocketHooks {
return this.socketServer.getSmartserveWebSocketHooks();
}
/**