3

I am creating a connection using a bonjour netservice between two iphones.

I connect using

CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault,
(CFStringRef)netService.hostName, netService.port, &readStream, &writeStream);

But I can not figure out how I can tell if the resulting connection is over bluetooth or not. Is there a way to determine the IP address... that should do it.

I figure that is important to comply with Apple's Human Interface Guidelines because if the connection is over WiFi I need to update the Network Activity Indicator in the status bar at times, but it looks like it might be misleading if i use that indicator in a bluetooth connection. (The indicator is beside the wifi connection, not the bluetooth one).

Thanks

StephenB
  • 41
  • 3

1 Answers1

1

I was able to figure it out. The server receiving the incoming connection receives the IP address. A bluetooth connection starts 169.254.x.x. That should be good enough for what I need.

StephenB
  • 41
  • 3