CFSocket client side exc_bad_access
CFSocket client side exc_bad_access
- Subject: CFSocket client side exc_bad_access
- From: Jeremy Thompson <email@hidden>
- Date: Tue, 18 Mar 2014 10:47:20 -0700
- Thread-topic: CFSocket client side exc_bad_access
I'm working some client code using CFSockets and am running into a ton of exc_bad_access errors. Its strange because handling data on the server side seems to work fine in this manner. Here's whats going on. When the client software calls to send data it does so through a void pointer. Void *passed_req
CFDataRef sf = (CFDataRef) passed_req; int slen = CFDataGetLength(sf);
Once I try and get the length of the passed_req I get a bad access error. I can sub in a length but then will receive bad access from CFDataGetBytes. It was my understanding that once the data is received into a CFDataRef even if said data may be binary you can still get the length in order to turn it into a UInt8 buffer. Is there something else I should be doing in order to handle sending a pointer? My server side code is similar to this(but is handling a receiving connection) and doesn't seem to have this problem. I also quickly wrote a BSD socket version to send data which does work correctly, however I would like to use CFSockets on both the client and server side. Any info would greatly appreciated. Thanks.
~Jeremy
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden