Hi, new native dev here. I'm building UDP socket exchange using objective C APIs, and I'm struggling to convert both sockaddr_in and sockaddr_in6 to CFDataRef to feed into CFSocketConnectToAddress. Related code:
My code was already in a memScoped block, should have clarified that, my bad. Given that, your suggestion is the same thing just with different semantics (run+this as opposed to a explicitly defined variable), and it gives the same issue, addr.ptr is a pointer to sockaddr_in6, not to UInt8Var as expected by CFDataCreate
j
Jan Holešovský
12/13/2023, 9:53 AM
Ah OK; maybe it'll be easier if you share a working example in swift & people here can help with the syntax conversion to Kotlin?