CFSocket Callback
CFSocket Callback
- Subject: CFSocket Callback
- From: "Edward Fink" <email@hidden>
- Date: Mon, 09 Sep 2002 12:40:04 -0400
How do I get the data returned from a CFSocket callback into a regular string ( char[ ] ) ?
Using something similar to the following I can printf the data, but I haven't figured out how
to get it into a regular string for manipulation.
Any ideas?
void whatToDo(CFSocketRef s, CFSocketCallBackType type, CFDataRef
address, const void *data, void *info)
{
printf ("%.*s\n\n", (int)CFDataGetLength(data),
CFDataGetBytePtr(data));
}
CFSocketRef s = CFSocketCreate(NULL, PF_INET, SOCK_STREAM, IPPROTO_TCP,
kCFSocketDataCallBack, whatToDo, NULL);
_______________________________________________
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.