pythonasyncioeventletgeventlong-pollinglow-latencysocket-iosocketiosocketio-serverweb-serverwebsocket
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
401 B
20 lines
401 B
import time
|
|
|
|
from socketio import packet
|
|
|
|
|
|
def test():
|
|
p = packet.Packet(packet.EVENT, "hello")
|
|
start = time.time()
|
|
count = 0
|
|
while True:
|
|
p = packet.Packet(encoded_packet=p.encode())
|
|
count += 1
|
|
if time.time() - start >= 5:
|
|
break
|
|
return count
|
|
|
|
|
|
if __name__ == "__main__":
|
|
count = test()
|
|
print("text_packet:", count, "packets processed.")
|
|
|