title: Converting CFSocket context to pointer
body: <p>I set the context to the address of the class that created the socket like this:</p>
  
  <pre><code>CFSocketContext ctxt = {0, (__bridge void *)(self), NULL, NULL, NULL};
  
      self.sock = CFSocketCreate(kCFAllocatorDefault, PF_INET, SOCK_STREAM, IPPROTO_TCP, kCFSocketDataCallBack|kCFSocketConnectCallBack, *(CFSocketCallBack)takeCallback, &amp;ctxt);
  </code></pre>
  
  <p>Then in the callback I put this:</p>
  
  <pre><code>static void takeCallback(CFSocketRef s, CFSocketCallBackType callbackType, CFDataRef address, const void *data, void *info)
  {
  
  PUFTransCont* obj = (__bridge PUFTransCont *)(info);
  
  }
  </code></pre>
  
  <p>I saw Apple sample code that does this and saw samples all over the internet doing this.  Why is it not working when I did it.  Whenever the execution hits </p>
  
  <pre><code>PUFTransCont* obj = (__bridge PUFTransCont *)(info);
  </code></pre>
  
  <p>I get a EXC_BAD_ACCESS</p>