Re: CFSocket questions
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.