This is an example of an app that connects to other devices running the same app over a local network
This is a realtime messaging app for devices on the same network.
Whoever joins the chat first becomes the host and acts as the server. Anyone who joins the chat after that will be connected to the host and assigned a random name from the Belgariad.
I have explained the process of the networking used in this app here: http://brendaninnis.ca/connect-nearby-devices-part-1.html