diff seobeo/seobeo.h @ 264:04fee26ecce0

add authenticated JRPG conversation platform Add reusable auth/session storage, owned conversation recovery, guest quotas, admin workflows, URL-routed conversation UI, mobile frame support, and parallel browser acceptance. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Fri, 07 Aug 2026 07:34:12 -0700
parents 1f9877b637e9
children
line wrap: on
line diff
--- a/seobeo/seobeo.h	Thu Aug 06 11:31:30 2026 -0700
+++ b/seobeo/seobeo.h	Fri Aug 07 07:34:12 2026 -0700
@@ -383,6 +383,17 @@
 extern void           Seobeo_SSE_Release(Seobeo_SSE_Stream *p_stream);
 /* Stop accepting records. The router retains ownership of the handle. */
 extern void           Seobeo_SSE_Close(Seobeo_SSE_Stream *p_stream);
+/*
+ * Register a callback invoked when the client disconnects (handle detached).
+ * The callback is called AFTER g_sse_mutex is released and may safely acquire
+ * other locks.  The stream pointer remains valid for the callback's duration
+ * (the caller's retained reference keeps it alive).
+ * cb may be NULL to clear a previously registered callback.
+ */
+extern void           Seobeo_SSE_Set_Detach_Callback(
+    Seobeo_SSE_Stream *p_stream,
+    void (*cb)(Seobeo_SSE_Stream *, void *),
+    void *ctx);
 
 // --- Helper functions --- //
 /* Destroy handle. It will handle all NULL poointers. */