Your code looks OK, but you have to ensure that the PUFTransCont
object is not deallocated
as long as it is used by the callback function.
One possible solution is to keep a strong reference to the object while the socket is in use (assuming that you compile with ARC).
Another possible solution is to transfer the ownership with
CFSocketContext ctxt = {0, CFBridgingRetain(self), NULL, NULL, NULL};
(which increases the retain count of the object), and release it later when the object is no longer needed, for example in the callback with
CFRelease(info);