1

この場合のデータをvalueListに1回のように渡し、数秒待ってからデータをvalueListに再度渡す方法を知る必要があります。私はデータが継続的に渡されることを望んでいません。代わりに、一度渡されてから数秒、さらに数秒渡されます。

screenw = 0
screenh = 0
while 1:
    client_socket.send("loc\n")
    data = client_socket.recv(8192)
    valueList = data.split()

    if (not(valueList[-1] == "eom" and valueList[0] == "start")):
        #print "continuing.."
            continue

        if(screenw != int(valueList[2])):
            screenw = int(valueList[2])
            screenh = int(valueList[3])
4

0 に答える 0