N        This expression returns the port that you are connected through to the server.


If not connected, this expression will return -1. Otherwise, it will be a number from 1 to 65,535.