        socket_listener_thread = threading.Thread(target=listener, args=(client_sock,))
        socket_listener_thread.daemon = True
        socket_listener_thread.start()
    
#Starts connection thread
listen_thread = threading.Thread(target=listen_for_connections)
listen_thread.daemon = True
listen_thread.start()

root.mainloop()
