OpaqueHandle appears in the map value type list in 0.5.4 error messages but is not usable:
let mut m = make(map[string]OpaqueHandle) // fails
let h: OpaqueHandle = conn // fails: expected OpaqueHandle, got TlsConn
let h = OpaqueHandle(conn) // fails: cannot find OpaqueHandle in scope
Use case: Madis multiplexed TLS worker needs to track thousands of concurrent TlsConn objects in a map. Currently requires a 150-line C bridge that stores void* pointers in a static array and exposes int handles.
What is needed:
- Cast/wrap:
OpaqueHandle(conn) or opaque_wrap(conn) -> OpaqueHandle
- Unwrap:
opaque_unwrap[TlsConn](handle) or typed accessor
- Collections:
map[string]OpaqueHandle and []OpaqueHandle
Alternative: expose server-side TLS as int handles (tls_server_pool_accept) matching the client-side tls_pool pattern. See issue #33 for context.
OpaqueHandle appears in the map value type list in 0.5.4 error messages but is not usable:
Use case: Madis multiplexed TLS worker needs to track thousands of concurrent TlsConn objects in a map. Currently requires a 150-line C bridge that stores void* pointers in a static array and exposes int handles.
What is needed:
OpaqueHandle(conn)oropaque_wrap(conn) -> OpaqueHandleopaque_unwrap[TlsConn](handle)or typed accessormap[string]OpaqueHandleand[]OpaqueHandleAlternative: expose server-side TLS as int handles (tls_server_pool_accept) matching the client-side tls_pool pattern. See issue #33 for context.