How to get Port number of wifiNetwork active currently in android

天大地大妈咪最大 提交于 2020-01-02 19:11:07

问题


I have an requirement where i need to supply IP address and Port number of currently Connected Wifi network.

I am getting IP address using WifiInfo class having getIpAddress() method.

But i am not able to get Port number.. Kindly provide an appropriate solution../


回答1:


Portnumber of Wlan?

You are dooing right by using the WifiManager. There is no WLAN port that's why you can't get the portnumber.



来源:https://stackoverflow.com/questions/14749497/how-to-get-port-number-of-wifinetwork-active-currently-in-android

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