P2P message sending using NAT punch-through in Android
问题 I try to send a message from one phone to another using Kryonet (that uses socket communication) and I intend to use NAT punch-through by storing the public address of the clients. The following code is used: public class MainActivity extends Activity implements View.OnClickListener { /** * Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = ((Button)