'Check connect to a specified server by :attr:`link`.
.. note:: This is a `classmethod`.
:param link: The link to a specified server. This string could be a
domain name or the IP address of a server.
:type link: str
:return: A flag indicating whether the connection status is good or
not.
flag  Status
1     OK
0     Error
:rtype: int'

@classmethod
def check_connection(cls, link):

    try:
        timeout = 3
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.settimeout(timeout)
        sock.connect((link, 80))
        sock.close()
        return 1
    except:
        return 0
