• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CFSocket client side exc_bad_access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: CFSocket client side exc_bad_access
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
    • Re: CFSocket client side exc_bad_access
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Obtaining NIC driver name from socket FD
  • Next by Date: Re: CFSocket client side exc_bad_access
  • Previous by thread: Re: Obtaining NIC driver name from socket FD
  • Next by thread: Re: CFSocket client side exc_bad_access
  • Index(es):
    • Date
    • Thread