In your callback, the data
parameter is indeed a CFDataRef
value for the kCFSocketDataCallBack
callback type.
CFDataRef dataRef = (CFDataRef) data;
Byte *array = new Byte[CFDataGetLength(dataRef)]; // Or use a fixed length
CFDataGetBytes(dataRef, CFRangeMake(0, CFDataGetLength(theData)), array);
The array
will then contains the array of byte.
Laurent Etiemble
2010-06-17 19:09:05