import socket

## BASIC METHOD
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  # IPv4, TCP
s.bind((socket.gethostname(), 1234))  # define port number
s.listen(5)

while True:
    clientsocket, address = s.accept()
    print(f"Connection from {address} has been established!")
    clientsocket.send(bytes("Welcome to the server!", "utf-8"))
    # Release client connection
    clientsocket.close()


##
