I created a simple socket program by python by creating two different files Server.py and a Client.py and tried to connect it by s.connect((host,port)) but
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
occurs
I have looked up many solutions on the net regarding this issue which could be due to Firewall issues, Malware in system, outbound firewall settings , Run by Administrator, even checked if the port was not in use by netstat in cmd but none of them solved my issue.
plz help
This is my code:
#SERVER.py
import socket
s= socket.socket()
host= socket.gethostname()
port = 5000
s.bind((host,port))
s.listen(1)
print(host)
print('Waiting for any incoming connections...')
conn, addr = s.accept()
print(addr,'Has connected to the server')
#CLIENT.py
import socket
s = socket.socket()
host=input('Enter host address:')
port=5000
s.connect((host,port))
print('Connected...')