Read original post by Peter Torr at Windows Phone Developer Blog
At the recent Build developer conference in San Francisco I presented a session on networking in Windows Phone 8. Part of the session was about HTTP networking using the new HttpClient portable library, but one of the more interesting parts of the session was about Proximity and how you can use it in your app to enable cool scenarios such as multiplayer gaming or seamless content transfer. In this blog post I cover much of the same ground as in the talk, which you also can watch online. You can download the accompanying source code from MSDN: Proximity APIs Sample for Windows Phone 8.
Although this blog post and the accompanying sample code are specific to Windows Phone, Windows 8 shares the Proximity APIs, and the core code works on both platforms.