Pages

Tuesday, April 28, 2009

Lovely CFNetwork World and Bonjour

With the help of Apple Bonjour it is possible to use all the devices available on the local network from iphone application (like printers that provide services and you can access it on the iphone). iPhone can also host these services. With Bonjour for window, I can discover iPhone on my local network through my computer and that gives me the service address like: http://harmeet-cheemas-mac-mini.local:28670/.
That port is the one that I assigned myself and that is my mini mac name.
Now that just bonjour.

With CFNetwork api it is possible to all sort of network communications. We can also write low level network routines in C using BSD sockets. But I used a really simple NSFileHandle for my simple crappy hello world app which listens to a client request. When I send request it sends back "harmeet is a good boy" html)

Intially, I wanted to find how to put Blackberry on these networks also. Blackberry does not seem to have special network discovery API like Apple Bonjour. However, it has Bluetooth support. It looks interesting.

No comments:

Post a Comment