from socket import *
import socket
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = "127.0.0.1"
port = 8000
serversocket.bind((host, 80))
serversocket.listen(5)
while True:
print "Server is ready to listen!"
c, addr = serversocket.accept()
y = c.recv(1024)
print y
serversocket.close()
文件" C:\ Python27 \ lib \ socket.py",第228行,在meth中 return getattr(self._sock,name)(* args)socket.error:[Errno 10013]尝试以某种方式禁止其访问套接字 访问权限
我尝试关闭Windows防御者,以管理员身份运行cmd,阻止防火墙。它与其他端口号完全一致。