Python socket ipv6 over network not working

Solution 1:

When the server receives a request, we need to put it in a loop to accept it. Like this

import socket

HOST = someip
PORT = someport

server = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
server.bind((HOST, PORT))
server.listen()
while True:
    try:
        conn, addr = server.accept()
        print(f"New request from {addr}")
    except KeyboardInterrupt:
        server.close()