Skip to main content
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
Source Link

Similar to paj28'spaj28's answer, but if both mobile devices can use WiFi, then there's an easy solution.

  1. Have both devices connect to your server over WiFi(they seem to be capable of doing this anyways, so I'm assuming this won't be a problem)

  2. Have the server record their connection information(Name, IP address)

  3. Pass all connection information to all connected clients

  4. Connected clients now have enough information to directly connect to each other without the server mediating the connection, and it stays within the LAN of your building.

In this situation you enable peer-to-peer connections but avoid the nasty business of finding peers. The server records the information necessary for peers to connect to each other, and you can either push that information out periodically or have the clients poll that information from the server so it only goes out on an on-demand basis.

Similar to paj28's answer, but if both mobile devices can use WiFi, then there's an easy solution.

  1. Have both devices connect to your server over WiFi(they seem to be capable of doing this anyways, so I'm assuming this won't be a problem)

  2. Have the server record their connection information(Name, IP address)

  3. Pass all connection information to all connected clients

  4. Connected clients now have enough information to directly connect to each other without the server mediating the connection, and it stays within the LAN of your building.

In this situation you enable peer-to-peer connections but avoid the nasty business of finding peers. The server records the information necessary for peers to connect to each other, and you can either push that information out periodically or have the clients poll that information from the server so it only goes out on an on-demand basis.

Similar to paj28's answer, but if both mobile devices can use WiFi, then there's an easy solution.

  1. Have both devices connect to your server over WiFi(they seem to be capable of doing this anyways, so I'm assuming this won't be a problem)

  2. Have the server record their connection information(Name, IP address)

  3. Pass all connection information to all connected clients

  4. Connected clients now have enough information to directly connect to each other without the server mediating the connection, and it stays within the LAN of your building.

In this situation you enable peer-to-peer connections but avoid the nasty business of finding peers. The server records the information necessary for peers to connect to each other, and you can either push that information out periodically or have the clients poll that information from the server so it only goes out on an on-demand basis.

Source Link
Shaz
  • 2.6k
  • 1
  • 14
  • 14

Similar to paj28's answer, but if both mobile devices can use WiFi, then there's an easy solution.

  1. Have both devices connect to your server over WiFi(they seem to be capable of doing this anyways, so I'm assuming this won't be a problem)

  2. Have the server record their connection information(Name, IP address)

  3. Pass all connection information to all connected clients

  4. Connected clients now have enough information to directly connect to each other without the server mediating the connection, and it stays within the LAN of your building.

In this situation you enable peer-to-peer connections but avoid the nasty business of finding peers. The server records the information necessary for peers to connect to each other, and you can either push that information out periodically or have the clients poll that information from the server so it only goes out on an on-demand basis.