java - How can I make a Client host a game between 2 Clients instead of Server hosting it -
such call of duty , halo does, how go creating games don't host? how have 1 of clients has connected server host game save space on server?
i don't have attempts, because i'm not sure how logic plays out. closest guess have somehow re-establish separate, private connection between 2 clients. myself have make sure port-forward , host on correct port ensure people can connection, don't know how set type of system.
so basically: 2 clients connect server server creates game, doesn't wanna handle data between 2 server picks client host game, game relies on host's connection
this classic problem in networking. common solution employed in voip infrastructures p2p calls. mentioned there central server clients connect , players on manage communication i.e. media or game data transfer on own.
the central server in case in charge of signaling , introducing players. communication parameters negotiated on central server. common protocols doing sip , negotiating ports , ip addresses - body of sip messages contain sdp messages. http://en.wikipedia.org/wiki/session_initiation_protocol
specifically nat traversal industry standard ice http://en.wikipedia.org/wiki/interactive_connectivity_establishment
do note comprehensive implementation of above mentioned protocols , standards not easy task @ there several network configurations possible. i'd recommend use above understand complexity of scenario. depending on feel - implement parts feel important.
alternatively, don't discard possibility of going have central server handling data. keeps things lot simpler.
Comments
Post a Comment