from core.connection import ServerConnection
from core.handleConnection import handleConnection

if __name__ == "__main__":
    my_socket = ServerConnection()
    my_socket.createConnection("", 8080)
    print("[+] Server started!")

    my_socket.listen()
    print("[+] Waiting for client to connect on port 8080")

    my_conn, _ = my_socket.acceptConnection()
    print("[+] Connection established with the client! Ezz")

    handleConnection(my_socket)

    my_conn.close()
