I can connect server and client in my own pc using ip ( but when I try to connect using domain instead it doesnt connect (be a bit light on me I am 13 and first question)

code for the server

import socket

def process():
    host = socket.gethostname()  # Server IP address
    port = 8080         # Port number
    print (host)
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.bind((host, port))

    print('Initiating clients')
    conn, addr = sock.accept()
    print("Connected with client with ip: "+str(addr))

and for client

import socket

host = socket.gethostname()  # Server IP address 'ishanserver.chickenkiller.com'
print (host)
port = 8080         # Port number

server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.connect((host, port))

i tried to see if my ip is connected to domain but i dont no how to check….
if i can be better plz inform…

New contributor

ishan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.