Source

Chatty /

Filename Size Date modified Message
Chatty.xcodeproj
Classes
1.6 KB
2.8 KB
12.0 KB
12.7 KB
181 B
879 B
13.3 KB
2.3 KB
10.1 KB
1.4 KB
1.1 KB
This is a fork of the original Chatty sample app by Peter Bakhyryev. Chatty is "a simple chat
application for the iPhone. It allows you to host your own chat room and advertise it on your local
Wi-Fi network (in which case your app acts as a chat “server”) or find and join chat rooms hosted by
other people on your network (acting as a chat “client”). Both announcement and discovery of chat
rooms are implemented using Apple’s Bonjour protocol. The goal of this app is to show you how to use
various networking-related frameworks available in the iPhone SDK version 2.x. The UI is minimal
(consisting of only 3 simple views) - just enough to be able to play with the core functionality of
the app without having to deal with complex UIKit code."

This fork is by Jens Alfke. It replaces the networking code in Chatty with my "MYNetwork" library,
a general-purpose networking framework that provides Bonjour service discovery, client and server
TCP streams, and a powerful messaging protocol called BLIP.

The functionality of Chatty hasn't been modified, and little of its code had to be changed (apart
from deleting all of its networking-specific code.)

SUGGESTIONS:

MYNetwork has a number of features that could be made use of in Chatty. Here are some ideas of
what you could add:

* Have chat rooms show how many current members they have (using the TXT record) and display this
  in the room-list view.
* Send photos (BLIPMessage objects can contain arbitrary data bodies, and have a Content-Type
  property indicating the MIME type.)
* Post "So-and-so joined" and "So-and-so left" messages to the room as people join and leave.
* Add private one-to-one messages as a special message type by using an additional flag property.
* Use SSL connections to prevent eavesdropping. Currently this would require embedding a
  certificate (and private key) in the app since there aren't any iPhone APIs for generating new
  X.509 certs. So this wouldn't provide secure identification, just encryption.

--Jens Alfke

REFERENCES:

The original article about Chatty is here:
http://www.mobileorchard.com/tutorial-networking-and-bonjour-on-iphone/

The original source code is here:
http://www.mobileorchard.com/wp-content/uploads/2009/05/chatty.zip

MYNetwork:
http://bitbucket.org/snej/mynetwork/