Android P2P idea
I've been looking around for some way to simulate Peer 2 Peer for games on the android and the best way I've been able to come up with is connected an android to a server and then routing through that server. I'm just looking for some thoughts on my way of solving the solution so that you could literally type in someones phone number and try and connect to them.
By use of a service module to check incoming text messages, which would be properly formatted for detection, it would interpret that another phone is trying to request a connection to another one of the androids applications. If the application is found it would then prompt the user as to if they wished to connect to the other person. If yes, their phone would send back a text message to the original phones, which also has the messaging system installed on it, which states it would like to connect and that this is my current IP address. The original phone, or host phone, would then open a connection with the other users phone via the Internet at which point the newly made connection could be used to transfer information back and forth.
Basic list layout Service module: - Writes/Receives formatted text messages to aler开发者_如何转开发t/verify someone is trying to connect to an application of theirs - Sender attempts to make a connection with the recipient phone, which takes connection and passes to desired application along with sending back a confirmation package - On confirmation Sender phone passes connection to original desired application.
Any thoughts, ideas, constructive criticism would be helpful.
* srry for bold, but I hope you understand why.the best way I've been able to come up with is connected an android to a server and then routing through that server
This is called TURN P2P implementation. You want to read about STUNT implementations too. You'll probably be interested in the JXTA P2P framework.
精彩评论