-1

hi now im learning and developing android application it's about remote controlling, make android phone to control computer but... i've encountered serious problem.. When client is under the NAT environment, both server and client couuldn't communicate each other.. well i've found out.. it was hole punching issue.. it says that i have to find NAT's ip and port address first. but i don't know how do i get the address. or i can't find simple code about it. can anyone help me? or it's okay just simple advice i desperatly needs your help. thanks.

John_potato
  • 105
  • 1
  • 4

1 Answers1

0
  1. Make your APP keep a long connection with Server

  2. Let server maintain all the connected clients, server will know the ip address and port nunmber

  3. Let server help you to forward the data or you can let server to help setup STUN

Please also refer to STUN (Session Traversal Utilities for NAT)

Robin
  • 10,052
  • 6
  • 31
  • 52