🐛 Activity refined

This commit is contained in:
2025-11-01 23:36:05 +08:00
parent ba8d5cee09
commit 3de73538c7
4 changed files with 104 additions and 34 deletions

View File

@@ -79,6 +79,8 @@ abstract class IpcServer {
Map<String, Function> handlers,
)?
handlePacket;
void Function(IpcSocketWrapper socket)? onSocketClose;
}
// Abstract base class for IPC socket wrapper
@@ -178,6 +180,8 @@ class MultiPlatformIpcServer extends IpcServer {
},
onDone: () {
talker.log('IPC connection closed');
removeSocket(socket);
onSocketClose?.call(socket);
socket.close();
},
onError: (e) {