Exists any client function to check server port?

I’m developing a Auto-Reconnect addon using net send with curtime but when is lagging is same then server crashed.

No i need a lua function to use on client side to check if ip:port are availble.

Anybody have any sugestions?