Why socket does not send more than 1 line in Python?

import websockets

from websocket import create_connection
ws = create_connection("---")
print (ws.recv())
input('Press enter to exit')

Why get sockets from 1 place and then nothing more
March 23rd 20 at 18:57
1 answer
March 23rd 20 at 18:59
Because you need to read in a loop! Otherwise you get only part of what had to go.
conn, addr = s.accept()
while 1:
 data = conn.recv(1024)
 if not data:

Find more questions by tags WebSocketPython