1532 w5x00_init() |
1532 w5x00_init() |
1533 |
1533 |
1534 if nic.ifconfig[0] != b'\x00\x00\x00\x00': |
1534 if nic.ifconfig[0] != b'\x00\x00\x00\x00': |
1535 sock = nic.get_socket() |
1535 sock = nic.get_socket() |
1536 try: |
1536 try: |
1537 nic.socket_connect(sock, nic.get_host_by_name('quad9.net'), 80) |
1537 nic.socket_connect(sock, nic.get_host_by_name('quad9.net'), 443) |
1538 nic.socket_disconnect(sock) |
1538 nic.socket_disconnect(sock) |
1539 print(True) |
1539 print(True) |
1540 except: |
1540 except: |
1541 print(False) |
1541 print(False) |
1542 nic.socket_close(sock) |
1542 nic.socket_close(sock) |