P2P communication , chat App (android)

匿名 (未验证) 提交于 2019-12-03 09:52:54

问题:

i am using this tutorial as guide. i am creating an android app which is basically chat application. this uses socket programming to communicate .

i want to connect directly to device and deliver the message. the message does not go to server. server only tell me the address of the device thats it.

i followed the tutorial i mentioned above and this only works for the case where client and server are within same wifi/network. i want to connect to server from client irrespective of their network connection place. how do i do it from any network to any network.

i think i need to use port forwarding , but this is not practical . so we better use a server for keeping track of all the ip changes. and deliver the messages directly from the source to client. so how do i do it. please suggest any resources.

update

as of now what i studied is i have to use innetaddress to communicate if i am inside an wifi router.

thank you

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!