I have a problem with these client and server codes, I keep getting the [Errno 10061] No connection could be made because the target machine actively refused it
I was facing a similar problem when I was calling REST API using python library and what I found that my server was going into sleep mode which was leading to this. As soon as I logged in to the server via Remote Desktop Connection, my API call used to work.