• 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
Re: CFSocket questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSocket questions


  • Subject: Re: CFSocket questions
  • From: Edward Fink <email@hidden>
  • Date: Tue, 10 Sep 2002 00:09:27 -0400

I have tried what you suggested but apparently I am doing something
wrong. I understand the concept and it seems like a great solution,
however I must be missing something. I have tried many different ways
but I cannot seem to get the info pointer assigned within the
CFSocketContext to my object. I've looked at the CFSocket header file
and the echo example in the developer docs but haven't figured it out.
The program keeps crashing right when it does the CFSocketCreate w/my
new CFSocketContext (shown below). Any help/suggestions would be
great.


CFSocketRef s = CFSocketCreate(NULL, PF_INET, SOCK_STREAM,
IPPROTO_TCP,
kCFSocketDataCallBack | kCFSocketConnectCallBack,
whatToDo, &sc);

On Monday, September 9, 2002, at 12:36 PM, Douglas Davidson wrote:
>
> For example: when you create the CFSocket, you can pass it a
> CFSocketContext whose info is a pointer to the object you want to pair
> with this particular socket. If you want the CFSocket to retain that
> object, then you can set the retain and release pointers; otherwise
> you can leave them NULL. When you get a callback, the last argument
> to the callback function is that info pointer. Cast it to the type of
> the object you are using, and then you can send messages to it.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: CFSocket questions
      • From: Becky Willrich <email@hidden>
References: 
 >Re: CFSocket questions (From: Douglas Davidson <email@hidden>)

  • Prev by Date: ARPDeleteEntry
  • Next by Date: Re: OS X Socket Performance
  • Previous by thread: Re: CFSocket questions
  • Next by thread: Re: CFSocket questions
  • Index(es):
    • Date
    • Thread