Will a websocket server "save and queue" messages if the client is not currently receiving them or will they get lost?

Viewed 29

I am using the python library websocket-client to connect to a server and receive data

from websocket import create_connection
api_data = {...}
connection = create_connection(DOMAIN)
connection.send(api_data)
while True:
   data = connection.recv()
   print(data)

This works and all, but in order to write a more sophisticated fail-safe application I need to understand how a websocket receive command works. If my program is busy doing other things, for example if I add a time.sleep(10) command in my while loop, will the updates "queue" and when I finally do connection.recv() I obtain all at once, or will messages from the server be lost? Any links that explain practical things like this are very welcome because I feel like I lack some very fundamental knowledge since I don't see questions like this posed anywhere.

0 Answers
Related