私のコードはこれです:
while 1:
# Determine whether the server is up or down
try:
s.connect((mcip, port))
s.send(magic)
data = s.recv(1024)
s.close()
print data
except Exception, e:
print e
sleep(60)
最初の実行では問題なく動作しますが、その後は毎回 Errno 9 になります。私は何を間違っていますか?
ところで、
mcip = "mau5ville.com"
port = 25565
magic = "\xFE"