When you talk about the port to which Wifi is connected then you are actually want to get the proxy port of the proxy host to which your Wifi is connected. To get such settings use the below library:
https://code.google.com/p/android-proxy-library/
Also look at below:
http://developer.android.com/reference/android/net/Proxy.html
There is no actual port related to Wifi or WLAN. Why do you want to get the port?