Click here to Skip to main content
15,890,825 members

Comments by Matt McKinney (Top 1 by date)

Matt McKinney 27-Sep-16 14:27pm View    
I absolutely agree... there is no reason to poll for external IP like the author believes is needed. Running a background thread/loop for this purpose seems pointless & redundant... unless the author has some really oddball gateway config on the other end of the tunnel.
Perhaps a better way is to trigger off of network events (assuming there is a VPN adapter) followed by a single external IP query.
See https://msdn.microsoft.com/en-us/library/system.net.networkinformation.networkchange.networkaddresschanged(v=vs.110).aspx